Repository navigation
Rename live Copilot sessions and find titled ones remotely - #957
Merged
Merged
Conversation
A blank-titled Copilot loop launched as graphcode-<uuid> and kept that name, because its suggested title arrives after launch and only Claude Code was sent /rename. Later renames were lost the same way. Copilot now gets /rename with the node's short id kept, since the name is also its lookup key. The remote lookups still matched the bare name exactly, so they never found a session named after its loop. All four now accept both forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: scgopi <scgopireddy@gmail.com>
The review of this PR found that /rename shared the session with things it could collide with. The first pass types outside GraphStore's chain, so the two could merge into one name and lose the lookup key. A liveness gate alone also let Enter land on a permission dialog, or /rename answer an open ask_user. A Copilot rename now waits, for up to three minutes, until no first pass is in flight, no question is open and the session has opened. If the wait runs out, the name stays stale and nothing is typed. Also keep titles inside what Copilot's rename accepts, drop control characters from session labels, tighten the remote matcher to a real closing quote, and pin the summary and presence reads with tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: scgopi <scgopireddy@gmail.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.
Problem
A blank-titled Copilot loop launches as
graphcode-<uuid>, because its suggested title only arrives after the session has started. Only Claude Code was sent/rename, so the Copilot session kept that name for good, and later loop renames were lost the same way.Separately, the remote Copilot lookups still matched the bare name exactly, so they never found a session named
Title · <id>. That affects the remote summary, the resume ID banking, presence and transplant.Fix
CLISessionBackendKind.renameCommandgives each backend its rename text. Copilot gets/rename Title · <8-char id>, because its name is also its lookup key.GraphStore.renameSessionuses it instead of checking for Claude Code. It stays behind thesessionNamingramp and still skips theNewNodeplaceholder.ZmxSessionLauncher.awaitRenameWindowholds a Copilot rename, for up to three minutes, until no first pass is in flight, no permission dialog orask_useris open, and a session with an opening prompt has shown it. If the wait runs out, nothing is typed anddials.logrecordswindow-closed. Claude Code's timing is unchanged.copilotNameMatcherreplaces the exactgrepat all four remote sites and accepts the bare name or the titled one, quoted or not.Evidence
Copilot 1.0.96-2 with an isolated daemon and real loops:
name:inworkspace.yaml'Fix: live · 94184782'user.message, turn not interruptedEarly Rename · 59A3B883ask)permission.completed, tool not runasksits silent before its first messagewindow-closedloggedRED: xcodebuild test -only-testing SessionNamingTests with the matcher and Copilot rename reverted -> exit 65, 9 issues; with the window ignored, the matcher loosened and quotes kept -> exit 65, 5 issues
GREEN: xcodebuild test -only-testing CopilotRenameTests and SessionNamingTests -> exit 0, 33 tests passed
REGRESSION: xcodebuild -scheme graphcode test -> exit 0, 2349 tests, 2348 passed, 0 failed, 1 skipped; make check -> exit 0; graphcoded and graphcode-cli builds -> exit 0; portable package -> exit 0; cli-smoke with a separate SwiftPM build -> exit 0
Not covered
zmx, not on a live remote or codespace, and not against GNU grep./rename.askthat stays silent keeps its bare name./renamein Copilot still drops the suffix.