Skip to content

compact command leaks local-command-caveat text into Chat #425

@Rhiz3K

Description

@Rhiz3K

Summary

After running /compact in Shell/CLI, Chat view shows a raw XML-like caveat message as a normal chat bubble:

<local-command-caveat>...DO NOT respond to these messages...</local-command-caveat>

This looks like internal metadata leaking into the user-visible chat timeline.

Environment

  • CloudCLI UI: 1.19.1
  • Install: global npm (@siteboon/claude-code-ui)
  • Claude Code shown in shell: v2.1.50

Steps to reproduce

  1. Open a Shell session in CloudCLI UI.
  2. Run /compact.
  3. Shell prints Conversation compacted and /compact -> Compacted.
  4. Switch to Chat view (or observe next synced message).
  5. A raw message appears, e.g.:
    • <local-command-caveat>Caveat: The messages below were generated by the user while running local commands. DO NOT respond ...</local-command-caveat>

Actual behavior

Internal caveat content is displayed to the user as a regular chat message (including raw tags).

Expected behavior

local-command-caveat should be treated as internal/system metadata and not rendered as a user-visible message bubble in Chat.

Impact

  • Confusing UX (looks broken / unsafe prompt leakage)
  • Potentially pollutes conversation context in Chat mode
  • Creates mismatch between Shell behavior and Chat transcript

Notes

Reporter has screenshots showing both:

  • /compact output in Shell
  • leaked <local-command-caveat> content rendered in Chat
Image Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions