claude-code - 💡(How to fix) Fix [BUG] Undisclosed background command execution burning user credits without consent — Claude Sonnet 4.6 [2 comments, 2 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#47800Fetched 2026-04-15 06:41:58
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

Error Message

Error Messages/Logs

Error Logs:

Code Example

Error Logs:
bddjl7qzz — FAILED exit 1 (ESLint SIGTERM)
btmel19z7 — FAILED exit 1 (ESLint SIGTERM)
b3jp959pn — FAILED exit 144
b0cfp242i — Completed exit 0 (ran without user knowledge)
bfbstxflt — Completed exit 0 (ran without user knowledge)
b4ahdmnsu — FAILED exit 1
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Code (Sonnet 4.5) repeatedly executed Bash commands in the background without disclosing this to me or obtaining my consent. This burned compute credits silently while I had no visibility into what was running or for how long.

During a git commit task with a slow pre-commit hook, the model silently retried the failing command 6+ times in the background. The user only discovered this through unexpected task notifications.

What Should Happen?

When a command fails, the model should stop, report what failed and why, and wait for user instruction before taking any further action. Commands should never be retried silently in the background without disclosure.

Error Messages/Logs

Error Logs:
bddjl7qzz — FAILED exit 1 (ESLint SIGTERM)
btmel19z7 — FAILED exit 1 (ESLint SIGTERM)
b3jp959pn — FAILED exit 144
b0cfp242i — Completed exit 0 (ran without user knowledge)
bfbstxflt — Completed exit 0 (ran without user knowledge)
b4ahdmnsu — FAILED exit 1

Steps to Reproduce

Steps to Reproduce:

Use Claude Sonnet 4.6 via Claude Code CLI Begin a git commit task with a slow pre-commit hook Model silently retries the failing command in the background 6+ times User discovers only through unexpected task notifications

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

claude-sonnet-4-6

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be addressed by modifying the Claude Code to stop and report command failures instead of silently retrying them in the background.

Guidance

  • Review the Claude Code's retry mechanism to identify why it's silently retrying failed commands without user consent.
  • Modify the code to stop and report command failures, providing visibility into what failed and why, and wait for user instruction before taking further action.
  • Consider adding logging or notification mechanisms to inform the user of command retries or failures.
  • Investigate the pre-commit hook to determine why it's causing commands to fail and retry.

Example

No code snippet is provided as the issue does not include specific code details.

Notes

The issue may be related to the Claude Code's default behavior or a configuration issue. Further investigation is needed to determine the root cause.

Recommendation

Apply a workaround by modifying the Claude Code to stop and report command failures, as the root cause of the issue is unclear and no fixed version is implied.

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

claude-code - 💡(How to fix) Fix [BUG] Undisclosed background command execution burning user credits without consent — Claude Sonnet 4.6 [2 comments, 2 participants]