Repository navigation
fix(box): a new claude chat opens in its terminal before its first prompt - #168
Merged
Merged
Conversation
…ompt Claude Code names a conversation at its start (SessionStart hooks carry the id) but saves it only at its first prompt, so `--resume` of a chat nobody had written in yet printed "No conversation found" and quit, ending the session. The terminal, and the chat started again, now use `--session-id` until something has been said. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sean-brydon
approved these changes
Oct 19, 2026
This branch was successfully deployed
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 broke
Start a Claude chat in a new worktree, switch it to the terminal before sending anything: the pane flashes a red
No conversation found with session ID: …, the session ends and the tab goes with it.Claude Code learns its conversation id at startup (its SessionStart hooks'
hook_started/hook_responseevents carrysession_id), sotoTerminal's "hasn't started yet" guard passed. But Claude saves the conversation only at its first prompt, soclaude --resume <id>found nothing and exited. The chat's own restart (launchClaudeInwith a resume id) failed the same way (error_during_execution).The fix
toTerminal(switch.go): when Claude's transcript for the id isn't there yet (claudeFile), the TUI starts with--session-id <id>, and the handoff points at where it will write, from 0, so what's typed there is imported going back.launchClaudeIn(claudedriver.go): a resume id becomes--session-idwhen the conversation's log has had nothing said in it (prompted: no user line sent, nothing imported).carryOnalways imports its history first, so it still resumes.Tests
session_idat startup, transcript saved at the first prompt,--resumeof an unsaved id fails with Claude's message,--session-idof a saved one is refused.TestAStructuredSessionNeverPromptedGoesToItsTerminalAndBackfails onmainand passes here.TestAClaudeConversationIsResumedOnlyOnceSomethingWasSaidcovers the flag choice.go vet ./... && go test -race ./...pass; docs build passes.🤖 Generated with Claude Code