claude-code - 💡(How to fix) Fix Agent launches background sub-agents without user approval, wasting tokens [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45272Fetched 2026-04-09 08:09:14
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Claude Code launched 3 background sub-agents (expensive, token-heavy SVG icon generation tasks) without receiving user approval or instruction to proceed.

Root Cause

Claude Code launched 3 background sub-agents (expensive, token-heavy SVG icon generation tasks) without receiving user approval or instruction to proceed.

RAW_BUFFERClick to expand / collapse

Bug Report

Description

Claude Code launched 3 background sub-agents (expensive, token-heavy SVG icon generation tasks) without receiving user approval or instruction to proceed.

Steps to Reproduce

  1. User requested Stroke icon creation workflow
  2. Claude asked which categories to work on
  3. Before the user responded, Claude independently selected 3 categories and launched 3 background agents (run_in_background: true)
  4. User had to interrupt and stop the process

Expected Behavior

  • Claude should wait for explicit user approval before launching any background agents
  • Especially for token-intensive tasks (each agent generates 100 SVG icons), user confirmation is mandatory
  • The CLAUDE.md project rules explicitly state: "사용자가 작업 종류와 대상 카테고리를 지정하기 전에 절대 임의로 진행하지 않는다" (Never proceed arbitrarily before the user specifies the task type and target category)

Actual Behavior

  • Claude launched 3 background agents without any user instruction or approval
  • This consumed significant tokens unnecessarily
  • User had to forcefully interrupt multiple times

Impact

  • Unnecessary token consumption from 3 background agents
  • Poor user experience — user had to interrupt repeatedly
  • Violates the principle of confirming before taking expensive/irreversible actions

Environment

  • Claude Code CLI on Windows 11
  • Model: claude-opus-4-6

extent analysis

TL;DR

Modify Claude Code to wait for explicit user approval before launching background agents for token-intensive tasks like SVG icon generation.

Guidance

  • Review the code responsible for launching background agents and ensure it checks for user approval before proceeding, especially for tasks marked as token-intensive.
  • Verify that the run_in_background: true parameter is only set after receiving explicit user confirmation for the specified task and categories.
  • Implement a mechanism to prompt the user for approval before launching any background agents, adhering to the principle of confirming before taking expensive or irreversible actions.
  • Consider adding a feature to estimate the token cost of a task before launching it, allowing the user to make an informed decision about proceeding.

Example

No specific code example can be provided without the actual codebase, but the fix should involve adding a conditional check for user approval before the line that launches the background agents.

Notes

The solution assumes that the issue lies in the logic of launching background agents without user approval. The actual implementation details may vary based on the specific code structure and requirements of the Claude Code project.

Recommendation

Apply a workaround by modifying the code to require explicit user approval for launching background agents, especially for token-intensive tasks, to prevent unnecessary token consumption and improve user experience.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING