Bug: Worktree-linked GUI sessions can detach into Inbox and disappear from Code view
Operating system(s)
What happened?
There seems to be a bug where GUI sessions can lose their association with a worktree/code context.
A session that was started from the Code tab inside a new worktree can disappear from that worktree and become accessible only through Inbox. After that, it no longer appears in the Code tab, does not show up under the worktree, and cannot be restored or switched back into the original worktree context.
This makes the session effectively detached from the code workflow, even though it was originally created from a worktree.
What happened
I started a new conversation from a new worktree in the GUI.
During the conversation, I switched to the Chat tab. I had some trouble switching the model/provider, but after it eventually worked, I sent a test message.
Then I tried to return to the Code tab to check the response in the worktree context.
At that point, I could no longer access the session from the Code tab. The session was only visible through Inbox.
The session no longer appeared under the worktree, and I had no way to restore or reattach it to the worktree.
Actual behavior
- A worktree-created session becomes detached from the worktree.
- The session moves or appears only in
Inbox.
- The session disappears from the worktree in the
Code tab.
- The worktree/session is not visible in
Past sessions.
- I cannot switch back to that worktree/session.
- It behaves as if the original worktree-linked conversation never existed.
- There is no visible way to restore, reattach, or move the session back into the worktree/code context.
Expected behavior
A session started from a worktree in the Code tab should remain associated with that worktree, even if I temporarily switch to Chat, change model/provider, or navigate using the sidebar.
At minimum, the GUI should provide a way to:
- return to the original worktree/session from the
Code tab,
- reattach an
Inbox session to a worktree,
- show detached worktree sessions in
Past sessions,
- or warn before detaching a session from its worktree context.
Steps to reproduce
This happened more than once, but not always in the same way.
Case 1
- Open the GUI.
- Create or switch to a new worktree in the
Code tab.
- Start a new conversation in that worktree.
- Switch to the
Chat tab during the conversation.
- Change the model/provider.
- Send a message.
- Try to return to the
Code tab.
- The session is no longer available in the worktree context.
- The session is accessible only from
Inbox.
Case 2
- Start a worktree-linked session in the GUI.
- Click one of the sidebar icons during the session.
- The session becomes detached in the same way.
- It disappears from the worktree/
Code view and is only visible in Inbox.
Impact
This is disruptive because worktree-linked coding sessions can effectively be lost from the code workflow.
The conversation still exists in Inbox, but it is no longer usable as a worktree/code session. I cannot switch to the worktree from that session, cannot find it in Past sessions, and cannot continue the original code workflow from the Code tab.
Agent implementation prompt
This seems related to navigation/state management in the GUI. The session probably still exists, but its metadata linking it to the worktree/code context appears to be lost or not restored when switching between Code, Chat, Inbox, and sidebar navigation.
A recovery option would be useful, for example:
- “Move session to worktree”
- “Reattach to current worktree”
- “Open in Code context”
- “Show detached sessions”
- or a worktree/session repair command.
App version or commit
0.1.66-dev
Bug: Worktree-linked GUI sessions can detach into Inbox and disappear from Code view
Operating system(s)
What happened?
There seems to be a bug where GUI sessions can lose their association with a worktree/code context.
A session that was started from the
Codetab inside a new worktree can disappear from that worktree and become accessible only throughInbox. After that, it no longer appears in theCodetab, does not show up under the worktree, and cannot be restored or switched back into the original worktree context.This makes the session effectively detached from the code workflow, even though it was originally created from a worktree.
What happened
I started a new conversation from a new worktree in the GUI.
During the conversation, I switched to the
Chattab. I had some trouble switching the model/provider, but after it eventually worked, I sent a test message.Then I tried to return to the
Codetab to check the response in the worktree context.At that point, I could no longer access the session from the
Codetab. The session was only visible throughInbox.The session no longer appeared under the worktree, and I had no way to restore or reattach it to the worktree.
Actual behavior
Inbox.Codetab.Past sessions.Expected behavior
A session started from a worktree in the
Codetab should remain associated with that worktree, even if I temporarily switch toChat, change model/provider, or navigate using the sidebar.At minimum, the GUI should provide a way to:
Codetab,Inboxsession to a worktree,Past sessions,Steps to reproduce
This happened more than once, but not always in the same way.
Case 1
Codetab.Chattab during the conversation.Codetab.Inbox.Case 2
Codeview and is only visible inInbox.Impact
This is disruptive because worktree-linked coding sessions can effectively be lost from the code workflow.
The conversation still exists in
Inbox, but it is no longer usable as a worktree/code session. I cannot switch to the worktree from that session, cannot find it inPast sessions, and cannot continue the original code workflow from theCodetab.Agent implementation prompt
This seems related to navigation/state management in the GUI. The session probably still exists, but its metadata linking it to the worktree/code context appears to be lost or not restored when switching between
Code,Chat,Inbox, and sidebar navigation.A recovery option would be useful, for example:
App version or commit
0.1.66-dev