fix(acp): go offline when Claude/Codex auth expires - #3876
Conversation
Give the event loop a distinct signal when credentials are dead so it can stop advertising online without exiting the process. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Headless Claude expiry reports -32000 with this message; dead-letter it with the existing Re-authenticate / 401 patterns instead of retrying forever. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Surface credential death to the event loop after dead-lettering the batch and posting the re-auth notice. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Keeps the harness process up for logs/restart, but stops looking online in the sidebar once Claude/Codex credentials are dead (block#3831). Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Pin the headless Claude expiry message so a future precision tweak cannot quietly drop it from the non-retryable set. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Regression pin for the block#3831 sidebar-online-after-credential-death path. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
The channel notice now matches presence behavior — re-login alone is not enough until the harness process is restarted. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Operators running headless Claude agents hit this often; put the recovery steps next to the other harness docs. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
@tlongwell-block @wesbillman @wpfleger96 mind taking a look when you get a chance? |
|
Independent macOS managed-agent reproduction. The failure surfaced as: The current patch matches Reauthenticating the Claude subscription and restarting the managed runtime restored turns. Could this PR add a precise match and fail-first test for
This is the same user-facing failure as #3831, just a fourth message variant. |
Summary
Authentication required(-32000) as a non-retryable auth error alongsideRe-authenticate/API Error: 401.offlineso the agent stops looking live in the sidebar.buzz-acpREADME.Fixes #3831
Test plan
cargo test -p buzz-acp --lib auth_errorclaude auth logout(or expire creds), @mention it — expect channel notice + sidebar goes offline, no further online heartbeatsMade with Cursor