Repository navigation
Fix prompted Copilot startup without preassigned session IDs - #229
Merged
Merged
Conversation
Bind startup prompt reservations to the exact returned terminal and discover the CLI-generated session ID through its bridge. Preserve full prompt transport, startup ordering, exact cleanup, and Resume selection. Allow two minutes for startup acceptance independently of post-fork setup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e2ea5171-0766-4200-be14-6cc6c9fdf9f7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0704f818-7516-4e51-a1c7-c2204f7025b5
There was a problem hiding this comment.
🟡 Changes recommended
Startup deferral can trigger duplicate AutoSync terminal launches instead of retaining instructions for the intended session.
1 open issue
What changed in this PR
Fresh prompted launches let Copilot generate session IDs and route startup instructions through the returned terminal’s bridge.
Changes:
- Remove preassigned IDs from fresh launches while preserving Resume behavior.
- Bind startup delivery to terminal identity and extend acceptance to two minutes.
- Update launch fixtures, ordering tests, and authoritative specs.
| File | Description |
|---|---|
| src/Tests/TestAgentRecorder/Program.fs | Generate fixture session IDs when absent. |
| src/Tests/TerminalHostTests.fs | Update fresh-launch command construction. |
| src/Tests/StartupPromptTests.fs | Cover terminal binding and deferred delivery. |
| src/Tests/EmbeddedLaunchEndToEndTests.fs | Adjust command expectations and path normalization. |
| src/Tests/CommandBuilderTests.fs | Verify fresh launches omit session selectors. |
| src/Server/TerminalLaunch.fs | Remove ID allocation and extend timeout. |
| src/Server/SessionBridge.fs | Bind startup prompts and defer ordinary delivery. |
| src/Server/CodingToolCli.fs | Separate fresh and Resume command arguments. |
| docs/spec/worktree-monitor.md | Document terminal-bound worktree startup. |
| docs/spec/embedded-terminal.md | Describe binding, ordering, and acceptance deadlines. |
| docs/spec/canvas-interaction-routing.md | Update startup routing documentation. |
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0704f818-7516-4e51-a1c7-c2204f7025b5
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.

Fresh prompted launches now let Copilot generate the session ID and deliver startup instructions through the bridge for the returned terminal. Resume still uses the existing session ID. Startup acceptance has a two-minute deadline, and later instructions stay queued for that terminal while startup is unresolved.
Updated the launch fixtures and specs.
Verification: 222 targeted startup, bridge, and worktree API tests passed. Real-session E2E verification was not run.