[BUG] Claude code can't track background script's progress due to "No shell found with ID:" error

Resolved 💬 3 comments Opened Sep 8, 2025 by VThejas Closed Jan 8, 2026

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?

When I'm trying to run a command in the background and make claude track the progress, it fails to track it due to the following error: "No shell found with ID:".

What Should Happen?

It should be able to retrieve the stdout/stderr of the process.

Error Messages/Logs

Relevant Logs:

...
{"type":"assistant","message":{"id":"msg_vrtx_01GQhVe19vgp4tQrw2XDb1yy","type":"message","role":"assistant","model":"claude-sonnet-4-20250514","content":[{"type":"tool_use","id":"toolu_vrtx_01DWFLz4dt6HM7R1m84oP9W1","name":"Bash","input":{"command":"for i in {1..100}; do echo \"Hello world\"; sleep 5; done","description":"Run loop printing Hello world 100 times with 5 second delays","run_in_background":true}}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":4,"cache_creation_input_tokens":16959,"cache_read_input_tokens":0,"output_tokens":140}},"parent_tool_use_id":null,"session_id":"5e92958f-7a41-49d9-9fdf-c56bbf947e1f","uuid":"73ec1cbc-031c-4dea-ac60-119c52a3aeb3"}
{"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_vrtx_01DWFLz4dt6HM7R1m84oP9W1","type":"tool_result","content":"Command running in background with ID: 737efa","is_error":false}]},"parent_tool_use_id":null,"session_id":"5e92958f-7a41-49d9-9fdf-c56bbf947e1f","uuid":"58923952-0a47-4cf3-888a-ac5d413cc0c2"}
{"type":"assistant","message":{"id":"msg_vrtx_017cGG5WAjYzMWoGM5TSA8N5","type":"message","role":"assistant","model":"claude-sonnet-4-20250514","content":[{"type":"text","text":"Now I'll monitor the output and status:"}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":7,"cache_creation_input_tokens":160,"cache_read_input_tokens":16959,"output_tokens":1}},"parent_tool_use_id":null,"session_id":"5e92958f-7a41-49d9-9fdf-c56bbf947e1f","uuid":"7535e0a3-ecde-4f89-8898-8b558396a617"}
{"type":"assistant","message":{"id":"msg_vrtx_017cGG5WAjYzMWoGM5TSA8N5","type":"message","role":"assistant","model":"claude-sonnet-4-20250514","content":[{"type":"tool_use","id":"toolu_vrtx_01MTHsM667ksiBV1oQScXGZj","name":"BashOutput","input":{"bash_id":"737efa"}}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":7,"cache_creation_input_tokens":160,"cache_read_input_tokens":16959,"output_tokens":67}},"parent_tool_use_id":null,"session_id":"5e92958f-7a41-49d9-9fdf-c56bbf947e1f","uuid":"0b0be265-5378-48c7-8d9b-14a8db0ee5ac"}
{"type":"user","message":{"role":"user","content":[{"type":"tool_result","content":"<tool_use_error>No shell found with ID: 737efa</tool_use_error>","is_error":true,"tool_use_id":"toolu_vrtx_01MTHsM667ksiBV1oQScXGZj"}]},"parent_tool_use_id":null,"session_id":"5e92958f-7a41-49d9-9fdf-c56bbf947e1f","uuid":"9d66378f-2b39-4fd8-be67-1695e6cdc42e"}

Steps to Reproduce

claude --verbose --allowedTools Read,Write,Edit,MultiEdit,Bash,Glob,Grep,LS,Task,NotebookRead,NotebookEdit -p --output-format stream-json 'can you run the following bash command:\n\nfor i in {1..100}; do echo "Hello world"; sleep 5; done\n\nRun it in the background and keep printing the status until its done'

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

1.0.108

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗