Repository navigation
feat(#645): relay CLI UX — sequant abort, prompt --wait, accurate phase label - #648
Merged
Merged
Conversation
Three independent CLI UX improvements that complete the user-visible gap list from #645 after the root-cause fix in #646. Each addresses one of the deferred gaps: Gap 7 — sequant abort <issue> Out-of-band escape hatch that bypasses the relay inbox entirely. Reads state.relay.pid (or the per-issue pidfile), sends SIGINT with a 10s grace, then escalates SIGTERM, then SIGKILL. Honors the existing ShutdownManager teardown so locks + relay archive run cleanly. Distinct from `prompt --type abort` by design: that is the polite path that needs the agent to read inbox; abort is the reliable kill that doesn't. Gap 6 — accurate currentPhase in prompt confirmation prompt now reads state.json with a fresh StateManager immediately before printing, bypassing any cached snapshot from the start of the command. When no fresh phase can be resolved, the label is omitted entirely — a wrong phase is worse than no phase. Gap 4 — sequant prompt --wait <seconds> Optional reply tailing: after appending to the inbox, poll the outbox for a response whose inReplyTo matches the new message ID. Print inline on hit, exit 1 with a "may be archived without response" message on timeout. Skipped for type=abort (no reply expected). Default behavior unchanged when --wait is absent. 11 new tests across abort + prompt-wait surfaces; 353 tests passing on the touched surface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to PR #646. Closes the user-visible CLI gaps that were deferred from the root-cause fix:
sequant abort <issue>: Out-of-band escape that bypasses the relay inbox. Readsstate.relay.pid, sendsSIGINT(10s grace), escalates toSIGTERMthenSIGKILL. Distinct fromprompt --type abortby design: that's the polite path; this is the kill that doesn't depend on the agent reading inbox.sequant promptconfirmation: Re-reads state.json with a freshStateManagerimmediately before printing, bypassing cached snapshots. Omits the label entirely when no fresh phase is available — a wrong phase is worse than no phase.sequant prompt --wait <seconds>: Optional reply tailing. After appending to inbox, polls outbox for a response with matchinginReplyTo. Prints inline on hit, exits 1 on timeout with "may be archived without response". Skipped fortype=abort. Default behavior unchanged when--waitabsent.Test plan
Unit (passing in CI):
npm run build(tsc) — cleannpx vitest run src/commands src/lib/relay src/lib/merge-check— 353 tests passingManual smoke (after merge):
Files
src/commands/abort.ts(new, 213 LOC) — abort command implementationbin/cli.ts(+37) —abortregistration and--waitoption onpromptsrc/commands/prompt.ts(+128) — fresh state re-read for Gap 6,--waitreply tailing for Gap 4src/commands/__tests__/abort.test.ts(new, 159 LOC)src/commands/__tests__/prompt-wait.test.ts(new, 163 LOC)Refs #645