[BUG] Session sidebar preview shows internal caveat message instead of user message.
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?
I've been primarily using the Claude Code CLI in a VSCode terminal.
It's been recommended to run the /clear command when changing topics, so I've been doing so.
I noticed today that the VSCode extension is also tracking the conversations I'm having in my CLI. Which is fine. And each time I run /clear, I get a new session in the Sessions sidebar. Which is also fine.
What I'm writing about is the fact that the title of each session I get after running /clear is
Caveat: The messages below...
Which isn't helpful for reviewing previous sessions.
What Should Happen?
When a session is created with /clear in the CLI, the VSCode extension should ignore the internal caveat message. Per Claude's wording: "The fix would be for the extension to skip system/caveat messages when generating the preview text."
Error Messages/Logs
Steps to Reproduce
- Open a terminal in VSCode with the Claude Code extension installed.
- Start a conversation with Claude in the terminal window
- Refresh the Sessions bar in the CHAT sidebar in VSCode to see a reasonable session title displayed
- Run
/clearin the terminal window and start a new conversation - Refresh the Sessions bar in the CHAT sidebar again
- See a new session with a title of "Caveat: The messages below..."
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.77
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗