fix(aos): forward every Claude credential the auth check accepts #1001
No reviewers
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!1001
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/claude-env-credentials-cross"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
docs/aos-claude-auth.mdstates the contract:ANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKEN, andCLAUDE_CODE_OAUTH_TOKEN"cross the container boundary by name when present, so nothing is projected."Only the first one actually crossed.
The gap
claudeEnvironmentAuthPresentaccepted all three and returned an empty projection on that basis.forwardedEnvironmentforwardedANTHROPIC_API_KEYalone. Those two lists were the only places either name appears outside tests.So a host holding only
ANTHROPIC_AUTH_TOKENorCLAUDE_CODE_OAUTH_TOKEN, with no credentials file and no Keychain entry, passed the auth gate, projected nothing, forwarded nothing, and started the container logged out. That is #968's symptom reached through a different door, and it contradicts the repo's own doc.The Codex side was correct, but by luck rather than by structure: its check-set and its forward-set were two separate literals that happened to agree.
The change
Not "add the two missing keys to the second list." That leaves the shape that produced the bug. This removes the second list.
Both the check and the forward now read
claudeEnvironmentAuthKeysandcodexEnvironmentAuthKeys, so accepting a key and forwarding it are one edit rather than two that can disagree.environmentAuthPresentcollapses the two identical loops.TestEveryAcceptedEnvironmentCredentialCrossesTheBoundaryasserts the invariant by reading those slices rather than restating them, per the AGENTS rule that tests never re-encode configuration. A key added to either set has to cross the boundary or the test fails.Verified
ward exec aos-testgreen.ward exec pre-commit-allgreen.--auth=falseis unchanged: no credential key is forwarded, and non-secret harness tuning still is.Not in this PR
While tracing this I hit a related question that is yours to answer rather than mine, so I left it alone:
--dry-runcurrently resolves credentials and fails closed without them, which is why the release smoke has to pass--auth=falseat four call sites and why #907 and #1000 were the same one-line patch twice.docs/aos-codex-auth.mddocuments that dry-run behavior deliberately ("Dry-run output contains only the auth path and mount shape"), so changing it is a contract decision, not a bug fix. Raised separately.🤖 Generated with Claude Code