/new already released the old native session through the chat-close
release path, but two gaps let the replaced session stay alive, and the
client told the operator it could still be resumed in a terminal:
- Claude Code: ReleaseSession only closed a host this server was
attached to. A host registered for the session but not attached (a
failed reattach, or one left by an earlier server) kept running. It is
now asked to close over its socket and killed as a fallback.
- Codex: ReleaseSession only interrupted an active turn. It now also
sends thread/unsubscribe so the App Server unloads the thread; a later
prompt reloads it through the existing "thread not found" resume path.
- The /new notice now says the previous session was stopped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep Esc and /stop scoped to the foreground turn while exposing an explicit stop-tasks operation for supported chat backends. Add the protocol, server routing, app command, and coverage for task stopping and unsupported harnesses.
A draft starting with ! shows a Shell mode indicator and runs through
chat_shell_run instead of being sent to the agent; the chat's actions menu
gains Run command. Each run is a terminal-style card among the turns with
live output, Stop, its exit status, Copy output and Send to agent.
The composer's /new used to create a separate chat. It now sends
chat_new_session. The server starts a fresh native session on the chat's
own harness (OpenCode, Codex or Claude Code) and re-keys the
operator_sessions row in one transaction. The chat keeps its title,
directory, backend, colour, star, model and mode. The old row is kept
unlisted with replaced_by, and its native session stays resumable.
The reply and the chat_session_changed push carry previous_id, so every
client swaps the row in place and an open conversation follows it to the
fresh, empty transcript with a notice.
A leading slash opens the recorded command palette above the composer,
filtered by name prefix and driven by Up/Down, Enter, tap and Escape.
Slash drafts never reach the prompt path: a recorded command reports
locally that its action is not implemented yet, and an unknown word takes
the web client's no-send report with an explicit Send as message offer.
Enter and the primary control share that route.
Adds the chat commands domain vocabulary, the palette widget, composer
wiring and regression tests; notes/C9-commands.md records behaviour and
the remaining command-action gap.