Bash deny rules are ignored and responses hallucinated consuming entire session
My local settings contains:
{
"permissions": {
"ask": [
"Bash(git:*)"
],
"deny": [
"Bash(*)"
]
},
"outputStyle": "Explanatory",
"spinnerTipsEnabled": false
}
Bash commands are strictly forbade. Claude does not recognize this! I let claude implement a plan via auto-accept edits which i never typically do. However, I wanted to listen to the general community feedback saying "trust claude to implement the plan." Well, how wrong was I!!! Claude cannot be trusted to even follow its own settings.
See the below responses from claude from this single session:
Bug Description
Claude is denied bash tools. However it doesn't recognize this. Then it some how still consumed THOUSANDS of tokens and it either hallucinated or retrieved someone elses context. For example
⏺ Bash(Check actual file structure)
⎿ Done (0 tool uses · 2.8k tokens · 14s)
⏺ OK, now I have the ground truth. Let me reconcile everything:
⏺ Bash(Read actual spawn.rs file)
⎿ Done (0 tool uses · 3.7k tokens · 24s)
⏺ This is a completely different codebase than what the plan described. The fix/restore branch has been
massively refactored:
⏺ Bash(Verify actual file structure)
⎿ Done (0 tool uses · 3.3k tokens · 15s)
⏺ Now I understand the full picture. The on-disk reality is:
⏺ Bash(Check Cargo.toml versions)
⎿ Done (0 tool uses · 2.5k tokens · 8s)
⏺ Now I understand! The codebase has been completely restructured since the files I was reading. The files
I've been editing are stale/wrong versions:
⏺ Bash(Verify our changes compile)
⎿ Done (0 tool uses · 3.0k tokens · 13s)
⏺ Something is very wrong here.
Claude wasted my entire session trying to implement a single plan consuming a ton of tokens while doing exactly nothing.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.37
- Feedback ID: feac73da-f9d4-43c8-afc8-9c151104eae0
Errors
[{"error":"SyntaxError: Expected double-quoted property name in JSON at position 281 (line 12 column 7)\n at JSON.parse (<anonymous>)\n at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:54:812\n at K (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n at FeY (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:3957:3069)\n at async tKq (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:3957:5848)","timestamp":"2026-05-21T16:55:28.661Z"},{"error":"Error: Request was aborted.\n at IC.makeRequest (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:371:3940)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)","timestamp":"2026-05-21T17:18:45.265Z"},{"error":"Error: 1P event logging: 5 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at BWA.queueFailedEvents (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1930:2315)\n at async BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1930:1197)","timestamp":"2026-05-21T17:40:13.933Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 5 events (code=ECONNABORTED, timeout of 10000ms exceeded)\\n at BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1930:1372)\",\"message\":\"Failed to export 5 events (code=ECONNABORTED, timeout of 10000ms exceeded)\",\"name\":\"Error\"}\n at TVA.error (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1973:34863)\n at GDA.error (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1499:6318)\n at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1925:29321\n at Am9 (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1925:29867)\n at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1926:20245","timestamp":"2026-05-21T17:40:13.934Z"},{"error":"Error: 1P event logging: 19 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at BWA.queueFailedEvents (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1930:2315)\n at async BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@2.1.37/node_modules/@anthropic-ai/claude-code/cli.js:1930:1197)","timestamp":"2026-05-21T17:41:32.876Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 19 events (code=ECONNABORTED, timeout of 10000ms exceeded)\\n at BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code…
Note: Content was truncated.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗