Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

[codex] Move Codex auth and runtime onto OpenAI Responses (#40)

7 months ago

57a2e5c
Authored
Max Weinbach3/14/2026, 9:29:30 PM
* Fix stale Codex account metadata precedence

* Remove PI-owned Codex auth and runtime wiring

* Simplify Codex OAuth browser handoff

* Fix OpenAI/Codex responses runtime metadata

* Fix responses model limit typing

* Normalize runtime on provider switches

* Gate auto OAuth callback on authorize success

* Normalize stale runtime fallback by provider

* Fix duplicate auto OAuth callback retries

* fix: block duplicate auto OAuth callbacks while awaiting result

Add awaitingResult guard to shouldStartAutoOauthCallback() so a second
provider_auth_challenge arriving while a callback is already in-flight
does not dispatch a duplicate callbackProviderAuth, which would hit the
server's busy guard and surface a spurious auth error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: clarify conventional commits format in AGENTS.md and CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Parent08023fe

28 files changed
  • AGENTS.md+1−1
  • CLAUDE.md+1−1
  • apps/TUI/component/dialog-provider.test.ts+131−0
  • apps/TUI/component/dialog-provider.tsx+61−46
  • config/defaults.json+0−1
  • docs/architecture.md+4−3
  • docs/websocket-protocol.md+4−6
  • src/config.ts+8−4
src/connect.ts
+18
−78
  • src/providers/authRegistry.ts+11−7
  • src/providers/codex-auth.ts+13−13
  • src/runtime/index.ts+7−5
  • src/runtime/openaiResponsesModel.ts+197−0
  • src/runtime/openaiResponsesRuntime.ts+3−3
  • src/runtime/piRuntime.ts+2−93
  • src/server/session/ProviderAuthManager.ts+6−43
  • src/server/startServer.ts+4−1
  • src/types.ts+21−0
  • tasks/lessons.md+1−0
  • test/config.test.ts+74−2
  • test/connect.test.ts+4−43
  • test/providers/auth-registry.test.ts+5−29
  • test/providers/codex-auth.test.ts+50−0
  • test/runtime.openai-responses-runtime.test.ts+2−3
  • test/runtime.pi-runtime.test.ts+58−5
  • test/runtime.selection.test.ts+39−6
  • test/server.test.ts+56−0
  • test/session.test.ts+23−26