claude-code - 💡(How to fix) Fix [Bug] Model hallucination causing incorrect code generation and failed validation

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":"McpToolCallError: Error: decision and preference captures must have at most one scope (ADR-0058)\n at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T11:37:27.671Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:2701:36263)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T11:48:03.649Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n at async As6 (/$bunfs/root/src/entrypoints/cli.js:447:4799)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:00:06.798Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:2701:36263)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:15:05.995Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: timeout of 30000ms exceeded\n at yP5 (/$bunfs/root/src/entrypoints/cli.js:2762:5605)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:00.774Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: timeout of 30000ms exceeded\n at yP5 (/$bunfs/root/src/entrypoints/cli.js:2762:5605)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:00.774Z"},{"error":"Error: ECONNREFUSED\n at from (/$bunfs/root/src/entrypoints/cli.js:112:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:12889)\n at emitError (node:events:43:23)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:1149)\n at emitError (node:events:43:23)\n at <anonymous> (node:http_client:253:22)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:15.783Z"},{"error":"McpToolCallError: Connection terminated due to connection timeout\n at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T13:06:04.949Z"},{"error":"McpToolCallError: Error: decision and preference captures must have at most one scope (ADR-0058)\n at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:02:19.440Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/Robert_Sfeir/projects/syntetiq. Did you mean testDb.ts?\n at call (/$bunfs/root/src/entrypoints/cli.js:4868:11360)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:04:32.095Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/Robert_Sfeir/projects/syntetiq. Did you mean testFixtures.ts?\n at call (/$bunfs/root/src/entrypoints/cli.js:4868:11360)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:04:35.254Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n {\n "expected": "string",\n "code": "invalid_type",\n "path": [\n "command"\n ],\n "message": "Invalid input: expected string, received undefined"\n }\n]\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5161:1013)\n at map (native:1:11)\n at hD (/$bunfs/root/src/entrypoints/cli.js:5161:559)\n at oMK (…

Root Cause

Bug Description Worst session ever. completely unable to debug a simple problem. Hallucinating at every turn. Even my investigator skill is making shit up. 3 commits (all local hot pushed) reverted because the changes it's making are total guesses even though I tried all different ways to have it validate what it did. Simply awful tonight.

Code Example

[{"error":"McpToolCallError: Error: decision and preference captures must have at most one scope (ADR-0058)\n    at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n    at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T11:37:27.671Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:2701:36263)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T11:48:03.649Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n    at async As6 (/$bunfs/root/src/entrypoints/cli.js:447:4799)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:00:06.798Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:2701:36263)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:15:05.995Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: timeout of 30000ms exceeded\n    at yP5 (/$bunfs/root/src/entrypoints/cli.js:2762:5605)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:00.774Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: timeout of 30000ms exceeded\n    at yP5 (/$bunfs/root/src/entrypoints/cli.js:2762:5605)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:00.774Z"},{"error":"Error: ECONNREFUSED\n    at from (/$bunfs/root/src/entrypoints/cli.js:112:7862)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:12889)\n    at emitError (node:events:43:23)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:1149)\n    at emitError (node:events:43:23)\n    at <anonymous> (node:_http_client:253:22)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:15.783Z"},{"error":"McpToolCallError: Connection terminated due to connection timeout\n    at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n    at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T13:06:04.949Z"},{"error":"McpToolCallError: Error: decision and preference captures must have at most one scope (ADR-0058)\n    at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n    at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:02:19.440Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/Robert_Sfeir/projects/syntetiq. Did you mean testDb.ts?\n    at call (/$bunfs/root/src/entrypoints/cli.js:4868:11360)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:04:32.095Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/Robert_Sfeir/projects/syntetiq. Did you mean testFixtures.ts?\n    at call (/$bunfs/root/src/entrypoints/cli.js:4868:11360)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:04:35.254Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"command\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  }\n]\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5161:1013)\n    at map (native:1:11)\n    at hD_ (/$bunfs/root/src/entrypoints/cli.js:5161:559)\n    at oMK (
RAW_BUFFERClick to expand / collapse

Bug Description Worst session ever. completely unable to debug a simple problem. Hallucinating at every turn. Even my investigator skill is making shit up. 3 commits (all local hot pushed) reverted because the changes it's making are total guesses even though I tried all different ways to have it validate what it did. Simply awful tonight.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.128
  • Feedback ID: ac2fc881-246d-4db8-b2d7-78a7d87ddf4f

Errors

[{"error":"McpToolCallError: Error: decision and preference captures must have at most one scope (ADR-0058)\n    at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n    at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T11:37:27.671Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:2701:36263)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T11:48:03.649Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n    at async As6 (/$bunfs/root/src/entrypoints/cli.js:447:4799)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:00:06.798Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:13305)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:122:2467)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:2701:36263)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:15:05.995Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: timeout of 30000ms exceeded\n    at yP5 (/$bunfs/root/src/entrypoints/cli.js:2762:5605)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:00.774Z"},{"error":"Error: Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest: timeout of 30000ms exceeded\n    at yP5 (/$bunfs/root/src/entrypoints/cli.js:2762:5605)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:00.774Z"},{"error":"Error: ECONNREFUSED\n    at from (/$bunfs/root/src/entrypoints/cli.js:112:7862)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:120:12889)\n    at emitError (node:events:43:23)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:119:1149)\n    at emitError (node:events:43:23)\n    at <anonymous> (node:_http_client:253:22)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T12:45:15.783Z"},{"error":"McpToolCallError: Connection terminated due to connection timeout\n    at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n    at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T13:06:04.949Z"},{"error":"McpToolCallError: Error: decision and preference captures must have at most one scope (ADR-0058)\n    at JQ5 (/$bunfs/root/src/entrypoints/cli.js:4894:63)\n    at pg7 (/$bunfs/root/src/entrypoints/cli.js:4894:1409)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:02:19.440Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/Robert_Sfeir/projects/syntetiq. Did you mean testDb.ts?\n    at call (/$bunfs/root/src/entrypoints/cli.js:4868:11360)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:04:32.095Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/Robert_Sfeir/projects/syntetiq. Did you mean testFixtures.ts?\n    at call (/$bunfs/root/src/entrypoints/cli.js:4868:11360)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T16:04:35.254Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"command\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  }\n]\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5161:1013)\n    at map (native:1:11)\n    at hD_ (/$bunfs/root/src/entrypoints/cli.js:5161:559)\n    at oMK (…

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