Repository navigation
Conversation
startSession closed the live query and revoked its MCP credential when a replacement was refused. Refuse that replacement, and leave the running query on the credential it already has.
|
@coderabbitai review |
|
@macroscope-app review |
Owner
Author
|
Superseded by upstream pingdotgg#13097 — closing fork-local PR. |
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
ClaudeAdapter.startSessionrefuses to replace an existing Claude session while child tasks are still running. It emitsruntime.warningand fails withProviderAdapterRequestError, leaving the open query and its runtime mode in place. Replacement when nothing is live is unchanged.ProviderService.startSessionno longer rotates the thread MCP credential before that refusal is accepted. While a session is already running, the new credential is issued alongside the existing one. If the adapter rejects the restart and the session is still up, the replacement credential is revoked and the previous credential is restored. An accepted replacement revokes only the credential the stopped query was using. A failed first start still clears the credential it just issued.Why
Closes pingdotgg#12694.
An incoming turn that restarted Claude called
startSessionover a live query. That closed the query, recorded child tasks astask.completed(stopped), and suppressedsession.exited, so the seat never saw a session boundary.Supersedes pingdotgg#12723, pingdotgg#13080, and pingdotgg#13086. Those were closed after Macroscope did not approve them. This redo keeps the gate in the Claude adapter and fixes the Macroscope High from pingdotgg#13086: a rejected
startSessionwas revoking the MCP credential the running Claude query still uses fort3-codetools. The live query now keeps that credential until replacement is accepted.UI Changes
N/A. Server provider session lifecycle only. A blocked replacement surfaces as a
runtime.warningand a request error on the turn.Linked Issues
Checklist
Implemented with Grok 4.7.