[BUG] Attaching an interactive session to Agent View can interfere with the session progress
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I tried to attach an existing interactive session to Claude agent View.
I ran the /bg command and the session was attached to agent view.
The status of the session in agent view was "Working"
I entered the session and I realized that the agent view manager had sent a command "continue" to the session.
Since the last response from Claude Code in the session had a question about proceeding to fix a bug, Claude Code interpreted that "continue" command from the agent view manager as a affirmative response to the last question in the session, so Claude started working on the fixes that it had proposed without my consent.
What Should Happen?
Attaching an existing session to the agent view using the /bg command should keep the session in its current state. Any commands run to attach the session to agent view should not be interpreted by claude code as a user response to the previous claude response.
Error Messages/Logs
Steps to Reproduce
- Open a new or existing claude code session where the last response from claude code contains a question asking for user confirmation. Example: "Do you want me to fix this bug?". But the user hasn't given any answer to it.
- Run the /bg command to send the session to the agent view (background)
- In the agent view, open the session, confirm that the "continue" command sent by agent view to the session has been interpreted by claude code as an affirmative user response to its previous question.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
v2.1.139
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗