Conversation
…case screenshots (pingdotgg#13316) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: Exotic <118054752+extoci@users.noreply.github.com>
…otgg#11580) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
…3355) Co-authored-by: Yordis Prieto <yordis.prieto@gmail.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
A replacement start and a recovery start could mint MCP credentials for the same thread at once, so the process that already spawned kept a bearer that had just been revoked. Session start and recoverSessionForThread now share one lock per thread. A failed start revokes a stale credential when the previous adapter is gone or the session probe fails, and a live Claude session is not replaced while child tasks are still running. Co-authored-by: maco <macodev00@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Claude session start and session recovery for one thread now take the same lock, from the
hasSessioncheck through MCP credential settlement.resolveRoutableSession(..., { allowRecovery: true })reaches recovery only through that lock, so it adopts a start that finished while it waited instead of minting a second bearer.A replacement that is refused while child tasks are still running leaves the open Claude query and its MCP credential in place. An accepted start revokes every superseded credential for that thread. A failed start revokes and clears the thread credential when the previous provider adapter is already gone, or when
hasSessionfails after the old session has stopped.Fixes pingdotgg#12694
Why
An ordinary turn could replace a live Claude session and stop its child tasks without a durable session boundary. Keeping that session up is only safe if the process that already spawned still holds a bearer that authorizes
/mcp. A concurrent recovery could revoke the credentialstartSessionhad just issued, and a failed start could restore a bearer for a process that is no longer running.UI Changes
No UI changes.
Checklist