[BUG] App-side auto-title rename injected into CLI session as a user turn (`/ter/rename <auto-title>`), aborting an in-progress /terminate

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 12, 2026

What happened

  • Claude Code CLI session running in tmux on macOS, attached to the Claude desktop app (Cowork "Code" view / Remote Control).
  • The session was never explicitly named. Its auto-generated title was "role you are the wts execution session on" (derived from the first prompt, "You are the WTS execution session on ..."). The tmux session was cc-role-you-are-the-wts-execution-session-on.
  • I typed exactly one command: /terminate. The session ran its wrap-up and armed a 25s self-terminate (detached tmux kill after the Stop hook).
  • Before it fired, a user message I never typed appeared in the conversation:

``
/ter/rename role you are the wts execution session on
``

  • The session interpreted this as user activity plus a rename request: it disarmed the self-terminate and renamed the tmux session. My intentional shutdown was aborted by an injected message.

Anatomy of the injected string

  • /ter — the first three characters of the only thing I actually typed (/terminate). Looks like input-buffer residue that got flushed.
  • /rename role you are the wts execution session on — a rename command whose argument is exactly the session's auto-generated title. This is consistent with the app→CLI name-sync path that applies app-side renames in the CLI (docs: Manage sessions → "Name your sessions"; related plumbing: #68488).

So the auto-title machinery appears to have pushed a /rename <current auto-title> into the CLI conversation as a user turn, concatenated with leftover fragments of my real input.

Why this matters

  1. A user turn was fabricated in my conversation. Until I decomposed the string, I could not tell whether my session had been tampered with.
  2. It canceled an intentional /terminate — the session silently stayed alive after I'd told it to shut down.
  3. Automatic mid-session retitling (previously requested to be disableable in #35810 / #39785, both closed as not planned) is now not just cosmetic churn — it corrupted user input and changed session lifecycle behavior.

Expected behavior

  • App/auto-title rename sync must never be delivered as a user conversation turn, and must never concatenate with pending user input.
  • Please provide a setting to disable automatic session retitling entirely.

Environment

  • Claude desktop app (Cowork Code view) on macOS + Claude Code CLI in tmux
  • Model: Opus 5 (per session footer), permission mode: bypassPermissions
  • Date observed: 2026-08-12

Screenshots of the full sequence to follow in a comment.

View original on GitHub ↗