Skip to content

fix(cli): persist a deploy's env credential so a new host-agent resumes it - #1024

Merged
edgar-durand merged 1 commit into
mainfrom
fix/host-agent-persist-credential-env
Nov 6, 2026
Merged

edgar-durand merged 1 commit into
mainfrom
fix/host-agent-persist-credential-env

Conversation

@edgar-durand

@edgar-durand edgar-durand commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Found by the codeam-cli v2.76.46 release gate (dev): after the Box was rebuilt on its volume, the host-agent resumed an Antigravity session (api_key) and it failed at start — ACP start failed for antigravity: Authentication required. credentialEnvByDeploy was in memory only, so ANY env-delivered key (Claude/Gemini/Cursor/Antigravity api keys) was lost on a Box rebuild, a wake or a self-update restart; login-file credentials (Claude/Codex OAuth) were unaffected (on the volume).

Fix: persist the env per deploy, 0600, atomically (~/.codeam/credential-env/<deployId>.json, same stance as the house-proxy config and the OAuth files), re-inject on resume when memory is empty, keep it in step on re-link and remove it on workspace cleanup.

Test: host-agent.test.ts — a NEW supervisor resumes the session with the key (fails without the fix); whole host-agent suite 188/188.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…es it

An api_key credential (ANTHROPIC/GEMINI/CURSOR_API_KEY) lived only in the
supervisor's memory. A Box rebuilt on its volume, a wake or a self-update
restart resumed the session with no key: live on the dev release gate,
"ACP start failed for antigravity: Authentication required". It is now
persisted 0600 per deploy (~/.codeam/credential-env/<deployId>.json, like the
house-proxy config) and re-injected on resume; refresh/cleanup keep it in step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@edgar-durand
edgar-durand merged commit edb9848 into main Nov 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants