Skip to content

feat(interactive): put resume command on own line - #1585

Open
sskys18 wants to merge 1 commit into
code-yeongyu:mainfrom
sskys18:feat/resume-hint-own-line
Open

sskys18 wants to merge 1 commit into
code-yeongyu:mainfrom
sskys18:feat/resume-hint-own-line

Conversation

@sskys18

@sskys18 sskys18 commented Sep 11, 2026

Copy link
Copy Markdown

Problem

The interactive quit path prints the resume hint as a single line:

To resume this session: senpi --session 01a08f23-1101-7f8a-93aa-d6ab86637b4d

That command exists to be copied, but the dimmed To resume this session: label shares the line with it. A double-click or triple-click selection picks up the label prefix too, so the command has to be trimmed by hand before it can be pasted.

Root cause

InteractiveMode.shutdown() joins the label and the command with a space in one process.stdout.write call.

Fix

Write the label and the command as two lines, so the command occupies a line by itself and line-wise selection copies exactly the runnable command:

To resume this session:
senpi --session 01a08f23-1101-7f8a-93aa-d6ab86637b4d

Nothing changes about when the hint appears: it is still emitted only on the non-signal shutdown path, and still gated on formatResumeCommand() returning a command. The signal path still prints no hint.

Tests

packages/coding-agent/test/suite/regressions/5080-signal-shutdown-extension-cleanup.test.ts already pinned the exact single-line string, so its expectation is updated to the two-line form. That test is the regression guard for this behavior.

Verified the updated expectation actually guards the change — with the test update applied but the interactive-mode.ts change reverted, the suite fails:

Test Files  1 failed (1)
     Tests  1 failed | 4 passed (5)

and with the source change applied it passes:

Test Files  1 passed (1)
     Tests  5 passed (5)

bun run check passes (exit 0) on this branch.

One note so the diff is not surprising: biome check --write reports Checked 3760 files in 5s. Fixed 4 files. — it reformats four remote-catalog-* files that this PR does not touch. That is pre-existing formatting drift on main as of d4b69da, reproducible on a clean checkout of the base commit, and those rewrites are deliberately excluded here so the diff stays scoped to the resume hint.

Tracker

packages/coding-agent/src/modes/interactive/changes.md gains an entry for the touched upstream-owned path under the four canonical headings, per the changes.md contract.

The resume command printed on quit exists to be copied, but the dimmed
"To resume this session:" label shared its line, so a double-click or
triple-click selection dragged the label in and the command had to be
trimmed by hand before pasting.

Write the label and the command as two lines so line-wise selection
copies exactly the runnable command. When the hint appears is unchanged:
still the non-signal shutdown path only, still gated on
formatResumeCommand() returning a command.
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.

1 participant