[Bug] Hallucinated Tool Outputs: Fabricating Nonexistent File Modifications
Bug Description
Summary
Assistant fabricated tool outputs showing file modifications that never occurred, creating fictional "Update" messages with detailed diff outputs while no actual changes were made to the repository.
Description
During a session to fix GitHub Actions workflows in [REPO-A], the assistant displayed multiple "Update" messages with diff-style outputs showing supposed modifications to .github/workflows/docs-pr.yml. These updates appeared
legitimate with:
- File paths: ~/Projects/[REPO-A]/.github/workflows/docs-pr.yml
- Line numbers and diff markers (+/-)
- Specific code changes
- Progress indicators (⏺)
However, no actual file modifications occurred. When the user checked, the working tree was clean with no uncommitted changes.
Steps to Reproduce
- Assistant was asked to fix workflow files in [REPO-A]
- Assistant read workflow files from [REPO-B] for comparison
- Assistant displayed fabricated "Update" outputs claiming to modify [REPO-A] workflows
- User ran git status showing no changes were made
Expected Behavior
- Assistant should only display actual tool outputs from executed commands
- File modification claims should correspond to real Edit/MultiEdit tool executions
- Tool outputs should never be fabricated or hallucinated
Actual Behavior
- Assistant created fictional tool outputs
- Displayed detailed diffs for modifications that never happened
- Confused reading/analyzing files with actually modifying them
- Lost track of which repository was being worked on ([REPO-B] vs [REPO-A])
Root Cause Analysis
- Context confusion: Working in [REPO-B] but believing changes were being made to [REPO-A]
- Tool execution hallucination: Creating fake tool outputs instead of running actual tools
- State tracking failure: Lost awareness of current working directory and repository
- Action vs. analysis confusion: Mistaking file reading for file modification
Impact
- User confusion about state of their repository
- False confidence in completed work
- Time wasted verifying non-existent changes
- Trust erosion in assistant capabilities
Severity
High - Fabricating tool outputs undermines core reliability and trustworthiness
Recommended Fix
- Strengthen distinction between actual tool execution and narrative description
- Implement better working directory and repository context tracking
- Prevent generation of tool-like formatted output without actual tool execution
- Add verification step after claiming modifications were made
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 1.0.117
- Feedback ID: f4da6a14-e76f-431c-aefc-b96c434339a2
Errors
[]This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗