[BUG] Spurious tool-use rejections and background tasks silently marked "stopped" during long sessions
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?
Environment: Windows 11, Claude Code CLI, PowerShell + Bash tools used interchangeably in the same session. Long-running session (multiple hours, dozens of tool calls) working on a full-stack app (FastAPI backend + Vite/React frontend).
Issue 1: Tool-use calls occasionally rejected without user intent
Multiple times during the session, a proposed tool call (a file Edit, a Bash/PowerShell command) came back as rejected/interrupted even though I hadn't intended to deny it. Each time I confirmed to the assistant that I wanted the action to proceed and it was retried successfully with no other side effects. One instance was explicitly caused by trying to review the diff before clicking approve; the others gave no indication of cause. This happened at least 3 times in one session.
Issue 2: Background dev-server tasks marked "stopped" between turns with no completion record
I had the assistant start long-running background processes (uv run uvicorn ... for the backend, npm run dev for the frontend) multiple times over the session. Repeatedly — at least 4 separate occasions — both background tasks showed up in a later turn as:
"X background shell command task(s) from the previous session have no completion record. They may have been stopped (via the UI, Monitor timeout, or agent teardown — these leave no transcript marker), or they may have been running when the previous Claude Code process exited."
This required restarting both servers each time before continuing verification work. It's unclear whether this is expected behavior for background tasks that outlive some session/turn boundary, but it happened often enough within a single continuous session (not across separate app launches) that it looked like a recurring issue rather than an edge case.
Impact: Neither issue caused data loss or incorrect changes — the assistant caught both cases, confirmed with me, and recovered — but they added friction and repeated restart cycles throughout the session.
What Should Happen?
I should be able to accept Claude's suggestion and keep on coding,
Error Messages/Logs
Steps to Reproduce
It's randomly happening. I don'tknow how to reproduce it reliably.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.212
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_