Repository navigation
Description
Summary
When /assess recommends actions for multiple issues that don't share a single workflow group, the Commands: block emits two (or more) separate command lines:
Commands:
npx sequant run 677 674 -Q
npx sequant run 672 -Q --testgen
Pasting this block into a terminal silently runs only the first command. The second line is lost.
Root cause
This is not a visual-formatting bug — it's a stdin-ownership bug inherent to the output shape.
sequant run is a long-running foreground process that reads stdin (HITL prompts, renderer input). On a bracketed multi-line paste, the terminal delivers all bytes as one stream:
- The shell executes line 1 →
npx sequant run 677 674 -Qtakes over the TTY and owns stdin. - The remaining bytes (
npx sequant run 672 -Q --testgen\n) are still in the input stream, but the running sequant process now owns stdin, so it consumes/buffers them instead of the shell receiving them after exit.
Net effect: the second run never executes. No whitespace/indent change fixes this — line 1 must not be a complete command at the moment the shell hits the newline.
Observed (#677/#674 ran; #672 was dropped):
sequant % npx sequant run 677 674 -Q
npx sequant run 672 -Q --testgen
SEQUANT WORKFLOW
...
Issues #677, #674 ← only the first command ran
Proposed fix
Join multi-line command groups with a trailing line-continuation (&& \\) so the block stays one-command-per-line (scannable) but pastes as a single logical command:
Commands:
npx sequant run 677 674 -Q && \\
npx sequant run 672 -Q --testgen
Why && \\:
- The trailing
\\makes line 1 syntactically incomplete, so the shell waits for line 2 instead of executing and grabbing stdin. This is the same convention every multi-line shell README already uses — no new vocabulary for the user. &&runs the second group only if the first exits 0 (a QA-gate failure / crash / Ctrl-C stops the chain — generally the safe default).- Visually near-identical to today's output: one command per line, fully scannable. Satisfies the skill's "scannable in under 5 seconds" principle.
Deliberately NOT doing
- No
Terminal 1:/Terminal 2:labels, prose, or box-drawing. That's over-hand-holding for a terminal-native audience and adds visual chrome to a glanceable dashboard. Box-drawing also reintroduces the mojibake risk tracked in the renderer corruption work (investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655) and the no-box-drawing formatting rule. - Not prescribing "run in separate terminals for parallelism." It is safe (each run takes a per-issue filesystem lock via
O_CREAT|O_EXCLinrun-orchestrator.ts:684+ isolated worktrees, feat(state): prevent concurrent sequant sessions from targeting the same issue #625) and faster, but it's an optimization that belongs in docs/notes, not in every multi-command assessment's default output.
Acceptance Criteria
- AC-1: When the
Commands:block contains 2+ command lines, all but the last line end with&& \\so the block pastes as a single shell command and everyrunexecutes. - AC-2: A single-command
Commands:block is unchanged (no trailing continuation). - AC-3: The chained form is documented in the Command Block Rules section of the assess SKILL.md (rationale: paste-safety, not cosmetics).
- AC-4: Change applied across all three skill mirror dirs —
.claude/skills/assess/,templates/skills/assess/,skills/assess/— and the batch examples updated to match. - AC-5: No box-drawing /
Terminal N:labels introduced (keep the dashboard scannable; honor the no-box-drawing rule). - AC-6: Decide & document behavior for 3+ command groups (long single chained line vs. acceptable) — note the chosen convention.
Edge cases / open questions
&&vs;:&&stops the chain on first-group failure (incl. Ctrl-C → non-zero). For independent issues;would always run both, but Ctrl-C then immediately launches the next group — usually unwanted. Recommend&&; confirm during spec.- The posted per-issue
<!-- assess:* -->markers are one-per-issue and unaffected — this is display-shorthand only.
References
- Skill:
.claude/skills/assess/SKILL.md→ "Command Block Rules" / "Commands:" block - Locking that makes concurrent runs safe:
src/lib/workflow/run-orchestrator.ts:684(feat(state): prevent concurrent sequant sessions from targeting the same issue #625) - No-box-drawing formatting rule; renderer corruption context (investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655)
Activity
admarble commentedon May 31, 2026
Closing — root cause was wrong
The original premise of this issue (multi-command
Commands:block silently drops the second command on paste) is incorrect, disproven by a real run.What actually happened
Pasting the two-line block ran both commands, consecutively:
Mechanism:
sequant runprocess reads stdin during the run but does not consume the queued line — because no HITL prompt fired, nothing actively pulled from stdin.The earlier "only #677/#674 ran" observation was a mid-run screenshot, not a dropped command — the second run simply hadn't started yet.
Residual (narrow) risk — not tracked here
There is a much smaller theoretical edge case: if a HITL prompt fires mid-run while a second command sits queued in the tty buffer, the prompt's stdin read could consume those buffered keystrokes — corrupting both the queued command and the prompt input. This is conditional, shell/terminal-dependent, and the proposed
&& \\fix doesn't cleanly address it. Not worth tracking pre-traction; can be re-filed with correct scope if it's ever observed in practice.Closing as not planned — the bug as described does not exist.