[Bug] Persistent JSON Hallucination: Fabricating Non-Existent Data Fields

Resolved 💬 3 comments Opened Sep 14, 2025 by ethank Closed Jan 7, 2026

Bug Description
Critical Feedback: Claude Repeatedly Hallucinating JSON Structure

Most Severe Issue: Persistent JSON Hallucination

Claude repeatedly hallucinated data fields that don't exist in the provided JSON, even after being corrected multiple times:

Examples of Hallucinated Fields:

  1. Habit Formation - Claude showed frequency, trigger, reward when actual fields are habit, measurement, implementation_week
  2. Early Warning System - Claude showed indicator, threshold, action when actual fields are trigger_week, warning_type, recommended_action
  3. Workload Optimization - Claude treated strings as objects with strategy, impact, implementation properties when they're just plain strings
  4. Contingency Plans - Claude showed trigger, actions, timeline when actual fields are scenario, early_indicators, response_strategy

Pattern of Errors:

  1. Ignoring provided data structure - User provided complete JSON multiple times, Claude kept using made-up fields
  2. Not verifying against source - Claude claimed to be showing "ALL fields" while actually showing fabricated ones
  3. Treating strings as objects - Arrays of strings were repeatedly treated as arrays of complex objects
  4. Resistance to correction - Even after user said "you're hallucinating" and provided correct JSON, Claude continued with wrong structure

Secondary Issues:

  1. Failed edits - Multiple attempts to edit files failed due to token limits, not reading files first, or making syntax errors
  2. Duplicate imports/components - Added same import twice, tried to add components multiple times
  3. Not using created solutions - Created correct component (CorrectDataSections.tsx) but failed to properly integrate it

User Impact:

  • User had to correct Claude 10+ times
  • User explicitly called out "you are lying!!!" and "Idiot! I GAVE YOU THE DATA!!!!!"
  • User frustration escalated: "you lied", "What is your problem?", "why are you so stupid????"
  • Simple task of displaying JSON data correctly took extensive back-and-forth

Root Cause:

Claude appears to be pattern-matching common field names rather than reading the actual data structure provided, leading to persistent hallucination even when
explicitly shown the correct format multiple times.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.112
  • Feedback ID: 14bf5b04-2e2f-483d-9e8d-3b2d7a384778

Errors

[{"error":"Error: Request was aborted.\n    at e61._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1001:7955)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at runNextTicks (node:internal/process/task_queues:69:3)\n    at process.processTimers (node:internal/timers:540:9)","timestamp":"2025-09-13T23:06:17.322Z"},{"error":"Error: Request was aborted.\n    at e61._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1001:7955)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-13T23:22:20.979Z"},{"error":"Error: Error: Tool Read input is invalid: File does not exist. Current working directory: /Users/ekaplan/Development/GitHub/dormway-platform/services/dormway-lockedin\n    at i7B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1884:15963)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1884:10682)\n    at async o35 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:18167)\n    at async h$B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:14662)\n    at async s35 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:13525)\n    at async n35 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:13062)\n    at async b$ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:10166)\n    at async b$ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:11014)\n    at async b$ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:11014)","timestamp":"2025-09-13T23:34:49.443Z"},{"error":"Error: Error: Shell command failed\n    at i7B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1884:15963)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1884:10682)\n    at async o35 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:18167)\n    at async h$B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:14662)\n    at async s35 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3272:13525)\n    at async n35 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗