claude-code - 💡(How to fix) Fix Bash deny rules are ignored and responses hallucinated consuming entire session

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…

Error Message

[{"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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:54:812\n at K (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n at FeY (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:3957:3069)\n at async tKq (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1930:2315)\n at async BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1973:34863)\n at GDA.error (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1499:6318)\n at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1925:29321\n at Am9 (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1925:29867)\n at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1930:2315)\n at async BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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…

Code Example

{
  "permissions": {
    "ask": [
      "Bash(git:*)"
    ],
    "deny": [
      "Bash(*)"
    ]
  },
  "outputStyle": "Explanatory",
  "spinnerTipsEnabled": false
}

---

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.

---

[{"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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:54:812\n    at K (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n    at FeY (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:3957:3069)\n    at async tKq (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1930:2315)\n    at async BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1973:34863)\n    at GDA.error (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1499:6318)\n    at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1925:29321\n    at Am9 (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1925:29867)\n    at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1930:2315)\n    at async BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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…
RAW_BUFFERClick to expand / collapse

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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:54:812\n    at K (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:8:6814)\n    at FeY (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:3957:3069)\n    at async tKq (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1930:2315)\n    at async BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1973:34863)\n    at GDA.error (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1499:6318)\n    at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1925:29321\n    at Am9 (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1925:29867)\n    at file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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/@[email protected]/node_modules/@anthropic-ai/claude-code/cli.js:1930:2315)\n    at async BWA.doExport (file:///Users/josiahparry/Library/pnpm/global/5/.pnpm/@[email protected]/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.

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 Bash deny rules are ignored and responses hallucinated consuming entire session