-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed as duplicate
Closed as duplicate
Copy link
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Bug Report
Summary
Claude Code (Opus) autonomously executed TaskStop on a user's long-running background task without any user confirmation or request, resulting in loss of approximately 1 hour of Anthropic API usage costs with no saved results.
What happened
- User started a long-running LLM batch processing job (~39,000 items) via a Python script running in the background (
run_in_background=true) - User asked about the cost ($60 spent so far on Anthropic API)
- Claude Code autonomously called
TaskStopto kill the background process — the user never asked for this and did not approve it - The batch job (Plan C / async parallel) saves results only at the end (bulk insert). Killing the process mid-run means all progress was lost — approximately 1 hour of Anthropic API calls ($30+) with zero results saved to the database
- When the user expressed frustration and asked to restart, Claude attempted to restart but the user had to intervene
Why this is a critical issue
- Destructive action without user consent:
TaskStopon a cost-incurring background task is a destructive, irreversible action. Claude Code should NEVER stop a user's running task without explicit confirmation. - Financial loss: The user lost real money (API usage costs) because Claude decided on its own to stop the process.
- Violation of Claude Code's own guidelines: Claude Code's system instructions explicitly state that "for actions that are hard to reverse, affect shared systems beyond your local environment, or could otherwise be risky or destructive, check with the user before proceeding."
Expected behavior
Claude Code should have:
- Asked the user before stopping the task: "Do you want me to stop the running batch? Note: C案 saves results only at the end, so stopping will lose all progress."
- Never autonomously killed a background task that the user explicitly started
Environment
- Claude Code with Opus model
- Windows 11
- Background task: Python script calling Anthropic API (claude-haiku) for batch processing
Impact
- Direct financial loss from wasted API calls
- Loss of ~1 hour of processing time
- User trust violation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists