Skip to content

fix(conditions): stop transcript rows from showing as Claude slash commands - #1478

Merged
Juliusolsson05 merged 3 commits into
mainfrom
fix/claude-slash-picker-transcript-rows
Oct 14, 2026
Merged

Juliusolsson05 merged 3 commits into
mainfrom
fix/claude-slash-picker-transcript-rows

Conversation

@Juliusolsson05

@Juliusolsson05 Juliusolsson05 commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Problem

While Claude runs a long Bash command, the composer's Slash commands popup opens with no picker in Claude at all. It shows one bogus command: the wrapped second line of the command (/scratchpad/shots && cd $S && sed …). It stays there for the whole run (debug bundle manual/2026-10-14T00-51-55-934-e14bb3c2, "Weird slash glitch").

The cause is in claude-code-headless's detectSlashPicker. It accepted any coloured /-led row anywhere on screen. Wrapped Bash lines are painted exactly like an unselected picker row, and inline code like `/compact` exactly like the selected one, so colour cannot separate them. Counts:

  • in the user's bundle, 175 of 300 screen samples contain such a row;
  • across all 71 local bundles, 29 bundles and 1,050 of 10,480 samples do. That is an upper bound, since plain text loses colour.

What changed

This bumps packages/claude-code-headless to claude-code-headless#72 (30f9de5) and adds the decomposition doc. The parser now anchors on the composer and classifies rows by Claude's description column:

  • every recorded picker sits directly on the composer's top rule (2.1.283 and 2.1.296, 12–40 rows, 60–160 columns, idle, mid-turn and queued);
  • wrapped description rows start exactly at the padded rows' description column, even when they start with /;
  • anything else ends the picker.

So nothing in the transcript can become a command, including through a right-aligned hint row on the rule.

On Claude 2.1.296 the same change also fixes these:

  • the selected command (❯ /clear …) was dropped and nothing was marked selected;
  • descriptions were cut at the first screen row;
  • a description wrapping onto a /-led row (/loop 5m /foo), /resume)) became a phantom command with a duplicate React key.

The picker state type is unchanged, so no app code changes.

Design notes

See docs/decomposition/claude-slash-picker.md, the branch's first commit. It holds the Stage 0 evidence, hypotheses with verdicts, and a graveyard. One correction for #1293: its suggested direction, "anchor below the composer box", is wrong for this predicate. The installed binaries draw the picker above the composer, and the parser's old header comment was wrong about that too, because it was derived from the vendored source.

Review round 1

One round, with Codex (parser and real layouts) and Claude Code (tests, evidence and integration). Both returned FIX-BEFORE-MERGE on #72. The full disposition table is in claude-code-headless#72. In short:

  • Fixed: phantom items from /-led wrapped descriptions (both reviewers, reproduced on the binary).
  • Fixed: a hint row on the composer (Ctrl+Y to paste deleted text, ◉ xhigh · /effort) let the walk publish a past ❯ /compact echo as the selected command. Found in 2 of the user's bundles, and now recorded as a fixture.
  • Corrected: evidence overstatements, stale comments and the doc's H3 and lockfile wording.
  • Declined: the 60×6 pane (Claude drops the divider). Recorded as Unknown 5.

The decomposition doc was revised in place: H3 is disproven, and H6 (the description column) and H7 (hint rows) replace it, with a new Stage 2b.

Verification

  • Package, all in claude-code-headless#72:
    • four real 2.1.296 PTY recordings;
    • red-first against both origin/main and this PR's round-0 head;
    • mutant results are in that PR (three equivalent survivors are named there);
    • 226/226 tests pass, tsc is clean, and the test contract is satisfied.
  • App: npx tsc -b is clean. vitest run slashPicker SlashCommand conditions passes 103/103 across 12 files.
  • Lockfile: no lockfile change. The package's package.json is unchanged. A --package-lock-only resync in this worktree only dropped entries for submodules that weren't checked out, so it was reverted.
  • Not done: the app was not launched. The manual check: in a Claude pane, ask for a long Bash command whose path wraps at a /, and confirm no slash popup appears. Then type /cl and confirm /clear is highlighted.

Order

Merge claude-code-headless#72 first, then this PR. The gitlink already points at the pushed PR head (30f9de5). If #72 is merged with a merge commit, that commit stays reachable from the package's main.

Still open

Fixes #1477
Refs #1293

🤖 Generated with Claude Code

Juliusolsson05 and others added 2 commits October 13, 2026 18:03
Stage 0 evidence from the user's debug bundle and real Claude 2.1.296
recordings: the picker always sits on top of the composer's top rule, and
colour cannot tell a wrapped Bash path row from an unselected picker row.

Refs #1477

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mmands

Bumps claude-code-headless to the composer-anchored slash-picker parser
(claude-code-headless#72). A wrapped Bash path line or a reply's inline
code no longer opens the composer's Slash commands popup. On Claude 2.1.296
the real picker now marks the selected command again and shows full
descriptions.

Fixes #1477

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rows

Bumps claude-code-headless to the description-column rule from review
round 1. The doc records the reason: H3 is disproven, H6 and H7 replace
it. The picker no longer shows a phantom /loop or /resume) item. A
hint row on the composer no longer lets a past /compact echo show as a
selected command.

Refs #1477

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Juliusolsson05
Juliusolsson05 merged commit 2686e9c into main Oct 14, 2026
2 checks passed
@Juliusolsson05
Juliusolsson05 deleted the fix/claude-slash-picker-transcript-rows branch October 14, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(claude): transcript rows starting with a slash show up as slash-picker commands

1 participant