You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix: Update GITHUB_PAT env var on container recreation #209
When an agent container is recreated (e.g., on restart when config changes are detected), recreate_container_with_updated_config in lifecycle.py copies env vars from the old container as-is:
It then updates ANTHROPIC_API_KEY and CLAUDE_CODE_OAUTH_TOKEN (lines 268-281), but never updates GITHUB_PAT. The PAT remains frozen at the value from agent creation time.
Solution
In recreate_container_with_updated_config, add logic to update GITHUB_PAT from the current system setting (after the API key update block at line ~281):
Add a check_github_pat_matches helper in helpers.py (similar to check_api_key_env_matches) that compares the container's GITHUB_PAT env var against the current system PAT.
Add this check to the needs_recreation condition in start_agent_internal (line 191-195).
Activity
fix: Update GITHUB_PAT env var on container recreation (#209)
fix: Update GITHUB_PAT env var on container recreation (#209) (#212)