claude-code - 💡(How to fix) Fix [Bug] Agents waste excessive token budget on permission checks without early validation [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#49125Fetched 2026-04-17 08:50:11
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×2

Error Message

[{"error":"Error: File does not exist. Note: your current working directory is C:\Users\Administrator\Documents\Snackys_child.\n at call (B:/~BUN/root/src/entrypoints/cli.js:4783:7630)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:06:42.035Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:08:33.774Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:15:33.632Z"}]

Root Cause

Then, it picked up config-skill, made some changes, and told me to restart. So I restart Claude Code, resume this chat and tell it to re-launch: this time it wastes all the remaining the session usage again because it somehow had to wait for 12 agents worth of work to realize that it is

Still blocked — additionalDirectories only grants read scope. Write and Bash still need explicit allow rules.

Code Example

[{"error":"Error: File does not exist. Note: your current working directory is C:\\Users\\Administrator\\Documents\\Snackys_child.\n    at call (B:/~BUN/root/src/entrypoints/cli.js:4783:7630)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:06:42.035Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:08:33.774Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:15:33.632Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description On a fresh 0% usage session window, I had told Claude to assign agents to implement a migration from a Markdown file that we had prepared in a few hours before.

I was hoping that by delegating it to multiple agents, it would help with having them all do "focused" work without bloated context, etc. What ended up happening was, on the first run it literally wasted about 45% of my session usage right away without getting any work done at all:

All 12 agents failed this round due to the permission issue — no partial work was done, so nothing is in a broken state.

Even though it claims no partial work was done, it seems that it has done everything except the final part of writing them to files, just to realize that it had no permissions for the target folder.

Then, it picked up config-skill, made some changes, and told me to restart. So I restart Claude Code, resume this chat and tell it to re-launch: this time it wastes all the remaining the session usage again because it somehow had to wait for 12 agents worth of work to realize that it is

Still blocked — additionalDirectories only grants read scope. Write and Bash still need explicit allow rules.

In a matter of minutes I went from 0% to 100% session usage, and it is possible that it chipped away from my extra usage balance too while I was trying to stop it, realizing what had happened.

I have been using Claude Code for months now, almost every single day. I would like to believe that I could have done a better approach perhaps, but I don't believe this is fully an end-user error.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.110
  • Feedback ID: 68868ea4-cd86-4169-8b52-8462286cb0d3

Errors

[{"error":"Error: File does not exist. Note: your current working directory is C:\\Users\\Administrator\\Documents\\Snackys_child.\n    at call (B:/~BUN/root/src/entrypoints/cli.js:4783:7630)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:06:42.035Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:08:33.774Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T11:15:33.632Z"}]
<img width="1073" height="600" alt="Image" src="https://github.com/user-attachments/assets/3f37e633-2f75-40de-812d-154e94a25117" />

extent analysis

TL;DR

The issue can be mitigated by ensuring the target folder has the correct write permissions before attempting to write files to it.

Guidance

  • Verify the permissions of the target folder to ensure it allows write access, as the error message indicates that additionalDirectories only grants read scope.
  • Check the configuration of config-skill to see if there are any explicit allow rules for write and Bash operations.
  • Consider breaking down the migration task into smaller steps to avoid wasting session usage in case of permission issues.
  • Review the error logs to identify any patterns or repeated errors that could indicate a deeper issue.

Example

No code snippet is provided as the issue seems to be related to configuration and permissions rather than code.

Notes

The issue seems to be related to permission issues and configuration, rather than a code bug. The user has been using the system for months, which suggests that the issue might be specific to this particular task or configuration.

Recommendation

Apply a workaround by ensuring the target folder has the correct write permissions before attempting to write files to it, as this is the most likely cause of the issue.

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] Agents waste excessive token budget on permission checks without early validation [2 comments, 3 participants]