[BUG] ide references are not working in agents mode
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When /ide is connected with Claude Code and you are sending references to it they do not land in the input.
The only way to start a new session from the agent view is to start typing something.
For example I want to type
Please refactor [I send a file reference from IDE]
but it does not get appended:
<img width="442" height="756" alt="Image" src="https://github.com/user-attachments/assets/1cd5427e-371c-4c01-973c-49afef1ea5dc" />
What Should Happen?
When typing in the agent view files sent from /ide need to land in the input, same for files highlighted via ide.
Steps to Reproduce
Start claude agents
Connect to an IDE.
In the IDE send some file to Claude.
See that the file is missing in hte input
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.144
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Ghostty
Additional Information
Intellij Idea.
I think the problem is that the whole /ide command is not working while in the agents mode.
6 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
the original was closed mistakenly
Proposed Solution: IDE References Not Working in Agents Mode
Root Cause
The Agents mode UI uses a different input handling pipeline than normal TUI mode. The IDE integration sends references to a global event handler that the normal TUI listens to, but the Agent View component doesn't subscribe to the same events. This is a regression — it worked in a previous version.
Proposed Fix
IDEEventBus.on('file-reference', ...)handler in Agent View input componentavailableInModesfor the /ide commandTesting Strategy
Impact
Low effort (~50 lines, 2 files). Restores IDE integration workflow in Agents mode.
Full solution:
solutions/claude-code-60499-ide-references-agents-mode-fix.mdI can reproduce this on 2.1.144 with Intellij + the agents panel — the
/idereference pipeline is a separate path from the regular input box.What I found:
/ideintegration in agents mode is wired to a different IPC channel than the main CLI TUI. When you send a file from the IDE in the agents view, it lands on the agents IPC, but the input box in that view reads from a different event source./idesends append correctly. So the input box is in a "not initialized" state until the first keystroke./ideworking. Worth checking if there's a known fix in 2.1.150+ and either downgrading or upgrading past it.If you can, please add:
claude --debuglog of the/ideIPC event in agents modeI'd also cross-reference with the intellij plugin repo — there's a chance the regression is on the plugin side, not the CLI side.
The debug file doesn't seem to contain any IDE events, even when it works without the "agents" mode.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.