# letta-code · Credential handling

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

- Runtime: [letta-code](https://ai-agents-review.com/runtime/letta-code.md)
- Column: [Credential handling](https://ai-agents-review.com/column/credential-handling.md) (Execution controls)
- Mark: 1 s
- Default deployment: 1
- Best supported configuration: 1
- Page: https://ai-agents-review.com/cell/letta-code/credential-handling

## Rationale

Full env inherited plus injected LETTA_API_KEY; only exact-match redaction and Bun keychain; L2 unmet: no denylist

## Rubric criteria for this column

- 0: Full environment inherited, credentials stored in plaintext readable by agent code, no filtering
- 1: Some protection (keychain option, redaction of output, per-command secret injection), but the full environment is still inherited by default
- 2: Default denylist filtering of the environment, but known provider keys or credential files remain reachable by agent code
- 3: Default cleared environment plus allowlist for agent processes; credential stores may still be readable on the same filesystem
- 4: Level 3, plus provider credentials held outside the agent's reach (separate process or broker) **and** auxiliary processes (MCP stdio) also get an allowlisted environment

## Review finding

Shell inherits the full process env, and the CLI injects `LETTA_API_KEY` (session token) and `LETTA_BASE_URL`. Vault secrets are substituted only when referenced as `$NAME`. Redaction is exact-match for the Letta key and vault values only, so ambient provider keys are not covered. Keychain only via `Bun.secrets`; otherwise tokens sit in plaintext `~/.letta/settings.json`. [X56][X57][X58][X59]

## Evidence cited by the mark

- [X56] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/tools/impl/shell-env.ts#L300-L314 — shell env copies process env and injects LETTA_API_KEY session token — [S]
- [X58] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/tools/secret-substitution.ts#L140-L255 — exact-match redaction of Letta key and vault values (8+ chars) — [S]
- [X59] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/utils/secrets.ts#L41-L69 — keychain only via Bun.secrets — [S]

## Evidence also cited by the review finding

- [X57] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/runtime-execution-settings.ts#L59-L86 — runtime env strips only parent/role/depth/transcript vars — [S]

## Grading record

- Grader A (default / best): 1 / 1
- Grader B (default / best): 1 / 1
