[BUG] Error: "No assistant message found" when using @ to reference a project file

Resolved 💬 7 comments Opened Oct 24, 2025 by Storinglele Closed Jan 12, 2026

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 using the Claude Code CLI and invoking the @ command to reference a project file (for example @project/), the CLI throws an internal error and crashes with Error: No assistant message found. The crash happens immediately after the @ reference is used.

What Should Happen?

Referencing a file with the @ command (e.g. @project/) should make the CLI load the file contents into context (or otherwise handle the reference gracefully) and return a normal assistant response. It should not crash or throw an internal error.

Error Messages/Logs

Error: No assistant message found
    at Ud (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3356:12901)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runNextTicks (node:internal/process/task_queues:69:3)
    at process.processTimers (node:internal/timers:540:9)
    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3356:21948
    at async nr1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3356:2007)
    at async kJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3356:21804)
    at async V9Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3363:200)

Node.js v23.11.0

Steps to Reproduce

Use the @ command in the dialog box, @project/

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.26 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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