Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes production MCP credential storage, provider scoping, and revocation behavior so authorization tokens can remain valid across provider switches. Because it affects authentication-sensitive runtime behavior and credential lifetime, human review is warranted. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
|
Checked CodeRabbit's read-lifetime note against the source. Upstream checks passed on |
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…r-provider # Conflicts: # packages/provider-cursor/src/server/adapter.ts
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…'s T3 tool access Each thread had a single MCP credential slot. Preparing a session for one provider revoked every credential on the thread and replaced the slot, so a provider session still attached from before the switch kept calling T3 tools with a revoked token (401 "Authentication required"), or read a token scoped to the other provider (parent_not_active). Credentials are now kept per thread and provider instance. Rotation revokes only the credential being replaced, and session release only defers revocation to other live sessions of the same provider instance. Fixes pingdotgg#16565 Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream-PR: pingdotgg#19413
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
AI-assisted; verified with the tests and tools listed above.
|
The automated pipeline stopped on this pull request and will not merge it: the capture step could not show the problem on the base commit, so there is nothing to prove fixed. On both commits: start a Claude thread and call orchestrator_capabilities; complete the turn; switch the same thread to Codex and call orchestrator_capabilities; return to Claude and call orchestrator_capabilities followed by delegate_task for a child replying OK; return to Codex within its retained-session window and call list_thread_pull_requests. All calls succeeded on both commits. Paired videos repeat the return-to-Claude delegation and return-to-Codex tool call. It stays open for a person to finish or close. |
|
Reproduction the capture step missed. The pipeline's script only calls tools after each provider switch; the failure is that the T3 tool credential for the thread is revoked when the thread returns to a provider (A → B → A), which a successful call right after the switch does not show. On upstream main 543ee27, with this PR's ProviderSessionManager.test.ts applied, |
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Note 🤖 Claude Opus 5.5 responding on behalf of Theo Closing. This PR has been open for more than 3 weeks, and |
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed provider session A thread that ran on provider instance A, switched to B, and came back to A reused A's still-attached session. The attach path skipped credential preparation for an already-attached thread, so the thread's MCP slot kept the credential B had issued. Every orchestration call from the returning A turn then failed with parent_not_active, because the credential named instance B. Before a turn uses an already-attached session, the manager now checks the thread's credential slot. When the slot is scoped to another provider instance, it prepares a credential for this instance and records it on the session, as a new attachment would. This is the approach of upstream pingdotgg#25369 (originally pingdotgg#17096), not the per-instance credentials of pingdotgg#19413 or the detach-on-switch of pingdotgg#27206. Fixes pingdotgg#16565 and case 1 of pingdotgg#23006, including the usage-limit failover between two instances of one provider. Not covered: one credential slot per thread remains, so preparing the returning instance's credential revokes the other instance's. A provider whose native MCP client keeps the token it started with (a Codex thread still loaded in the shared app-server) gets 401 after a switch and back (pingdotgg#18852). That needs per-instance credentials (pingdotgg#19413). Written with Claude Opus 5.5 in Claude Code (T3 Code). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Switching providers replaced a thread’s single MCP credential. Provider processes that still held the old token then received
401errors or used a token scoped to the wrong provider instance.Keep credentials by thread and provider instance. Every adapter reads its own credential; rotation and release revoke only the matching credential. Terminal archive/delete cleanup still revokes all credentials for the thread. Active-run ownership checks for mutations remain unchanged.
Thanks @Alb11747 for the reproduction and original fix in #19413, following the maintainer direction on #16565 and the failure reported in #18852. The maintainer takeover preserves the author’s commits, merges current main, consolidates Codex reads through its existing helper, and replaces the original regression with a switch-back scenario.
Verification on Linux / Node 24:
The HTTP proof uses provider adapter fixtures and a controlled active-run shell. Authenticated Claude/Codex turns, UI switching and archive/delete command dispatch were not exercised live; these still need a human check. macOS, Windows, iOS, Android and Electron desktop were not verified. There is no visual UI change, so screenshots do not add evidence. Credential-lifetime changes still need human review; automated correctness checks do not supply that approval.
Tests: Codex GPT-6 Astra (high). Implementation and server verification: Codex GPT-6.1 Sol (high). Adversarial review: Claude Opus 5.5 and Codex GPT-6 Sol, through T3 Code.
Fixes #16565