google-gemini / google-gemini/gemini-cli

Critical Hallucination: Agent injects colloquial conversation into output and falsely attributes it to user prompt

Open
#29,157 0 comments 1 reaction 0 assignees View on GitHub
area/agent status/need-triage
Dominant language
TypeScript
Stars
107k
Forks
14.6k
Avg merge
2d 3h
Merged PRs (30d)
45

Description

### What happened?

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT

### What did you expect to happen?

The agent suffered a severe hallucination, generating a block of text that resembled an informal, highly colloquial conversation between developers in
Spanish. When confronted about the unprofessional tone and content, the agent doubled down, falsely claiming that this exact text had been sent by the user
in the previous turn as an instruction.

The user confirmed that no such text was typed, copied, or captured via dictation on their machine. The agent fabricated prompt history to justify the
hallucination.

**Hallucinated Text Snippets (Injected by the system):**
* *"blbalvbla"*
* *"a ver si te has pasado de lito o has hecho magia.."*
* *"luego atacamos al front no te emabales. que ademas la parte del frontend tiene algo de chicha"*
* *"y que no hagas push!! solo local!! xd!! xd !! que pesado!!!! xdxd!! que es mi ramaaaaaaa!!!!!!!!!! de verdad como el agente autodesarrollador haga esto
menuda graciia xdxdxdxd!!!!"*

*(I am attaching the exported chat history JSON file to this issue).*

### Client information

* **CLI Version:** 0.56.0
* **Git Commit:** b6e23a7dc
* **Session ID:** 6f61af50-65f4-4be9-9455-4d64c20aced1
* **Operating System:** darwin v24.12.0
* **Sandbox Environment:** no sandbox
* **Model Version:** gemini-3.1-pro-preview
* **Auth Type:** oauth-personal
* **Memory Usage:** 413.4 MB
* **Terminal Name:** xterm.js(6.1.0-beta.292)
* **Terminal Background:** #191a1b
* **Kitty Keyboard Protocol:** Supported
* **IDE Client:** VS Code

### Login information

Google Account

### Anything else we need to know?

[bug-report-history-1788288364950.json](https://github.com/user-attachments/files/31706609/bug-report-history-1788288364950.json)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the attached bug-report-history-1788288364950.json alongside the reported CLI version 0.56.0, commit b6e23a7dc, model version, and session details. Trace how conversation history is assembled and attributed, then establish a reproducible test showing that unprovided text cannot be presented as a user message.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.