fix(auth): reconcile Codex credential transitions - #895
Conversation
Refs: SAP-3116
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughCodex sessions now support MCP credential-triggered restarts, authentication lifecycle handling, disconnect cleanup, and credential launch metadata. Tests cover equivalent Claude Code and Codex behavior. Related documentation uses coding-agent terminology. ChangesCodex MCP lifecycle
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Codex credential lifecycle handling now aligns with the existing Claude Code flow, with coverage for restart and disconnect behavior. No current merge-blocking risk was identified. Sequence Diagram(s)sequenceDiagram
participant AuthAPI
participant SessionManager
participant HarnessAdapter
participant Runtime
AuthAPI->>SessionManager: Request MCP credential restart
SessionManager->>Runtime: Kill stale runtime
SessionManager->>HarnessAdapter: Resume with current credentials
HarnessAdapter->>Runtime: Create resumed runtime
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit watched the runtimes restart Comment |
Review — PR #895 (
|
Refs: SAP-3116
|
@coderabbitai rate limit |
|
Your plan includes PR reviews subject to rate limits. More reviews will be available in 21 minutes. |
Follow-up review — PR #895 (delta since
|
Refs: SAP-3116
…-credential-restart
Refs: SAP-3116
Primary change type
Problem and motivation
The stale-MCP-credential recovery added in #872 only tracked Claude Code launches. Codex now receives the same generated, API-key-bearing Sapiom MCP configuration, so its live sessions can retain stale credentials after login or key rotation and can survive disconnect with a removed credential.
This addresses the unresolved review question on #872: #872 (comment).
Summary and scope
OAuth cancellation and unrelated authentication changes remain out of scope.
Related work
Related issue or discussion: SAP-3116, #872
Validation
Tests and documentation
Lifecycle and SessionManager regressions now run against Claude Code and Codex. Provider-specific internal comments were updated; no README change is needed because this restores intended provider parity rather than adding a new workflow.
Compatibility and release impact
@sapiom/harness, including Codex restart state, explicit restart, and disconnect termination.Security
AI assistance
Codex traced the provider-specific launch/restart path and generated the focused implementation and regression-test edits. I reviewed the complete diff and validated it with the commands above.
Checklist
CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.Refs: SAP-3116
Summary by CodeRabbit
New Features
Bug Fixes