Skip to content

Restore Codex subscription auth handshake - #927

Open
m-mohamed wants to merge 2 commits into
yc-software:mainfrom
m-mohamed:codex/restore-chatgpt-app-server-login
Open

Restore Codex subscription auth handshake#927
m-mohamed wants to merge 2 commits into
yc-software:mainfrom
m-mohamed:codex/restore-chatgpt-app-server-login

Conversation

@m-mohamed

@m-mohamed m-mohamed commented Sep 4, 2026

Copy link
Copy Markdown

Summary

  • log the Codex app-server into ChatGPT subscription auth after initialization
  • service app-server token refresh requests through the central auth store
  • re-authenticate shared runtimes when the access token rotates while keeping child auth files refresh-token-free

Regression

A sanitized auth.json alone does not establish the app-server bearer session, so subscription-backed turns can fail with 401 Unauthorized: Missing Bearer.

Verification

  • regression test first reproduced the 401 before the implementation
  • node --experimental-test-module-mocks --test test/codex-auth-store.test.ts test/codex-harness.test.ts (50/50)
  • npm run typecheck
  • npm run lint -- --quiet
  • npm run format:check -- src/harness/codex-auth-store.ts src/harness/codex-harness.ts test/codex-auth-store.test.ts test/codex-harness.test.ts

The child process still receives only sanitized OAuth material; the refresh token remains owned by the central store.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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.

1 participant