Skip to content

fix: surface expired auth as AuthRequired - #505

Open
kocaemre wants to merge 1 commit into
agentclientprotocol:mainfrom
kocaemre:fix/expired-chatgpt-auth-required
Open

kocaemre wants to merge 1 commit into
agentclientprotocol:mainfrom
kocaemre:fix/expired-chatgpt-auth-required

Conversation

@kocaemre

Copy link
Copy Markdown

Summary

  • Return ACP AuthRequired for terminal Codex auth failures even when a session had credentials configured.
  • Keep configured non-auth failures, such as usage limits, on the existing InternalError path.
  • Add regressions for expired configured ChatGPT credentials and terminal HTTP 401 responses.

Closes #495

Test Plan

  • npm test -- src/__tests__/CodexACPAgent/auth-error-events.test.ts -t 'AuthRequired|configured non-auth'
  • npm test -- src/__tests__/CodexACPAgent/auth-error-events.test.ts
  • npm run typecheck
  • npm run build
  • git diff --check
  • npm test

Note: Claude Code delegation was unavailable in this cron shell because claude auth status --text reports Not logged in. Run claude auth login to authenticate.; implementation and validation were performed directly with local tests.

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>
@kocaemre
kocaemre force-pushed the fix/expired-chatgpt-auth-required branch from 35bf646 to ad79bc4 Compare October 1, 2026 14:20
@kocaemre

kocaemre commented Oct 1, 2026

Copy link
Copy Markdown
Author

Rebased this PR onto current main and resolved the auth-error handling conflict against the newer session-failure flow.

Verification on the rebased head ad79bc4792b1bf655dc02dc55a130ac07a3e1af5:

  • npm ci
  • npm run test -- src/__tests__/CodexACPAgent/auth-error-events.test.ts -t 'AuthRequired|retryable HTTP 401|configured non-auth|ACP login error' — 8 passed / 53 skipped
  • npm run test -- src/__tests__/CodexACPAgent/auth-error-events.test.ts — 61 passed
  • npm run typecheck
  • npm run build
  • git diff --check upstream/main..HEAD

gh pr view now reports the PR as OPEN / MERGEABLE / UNSTABLE; there are no checks reported on main for this repo.

This branch has not been deployed

No deployments
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.

Expired ChatGPT credentials return InternalError instead of AuthRequired

1 participant