Skip to content

Composer ! shell mode: run a command in the worktree without a model turn #470

Closed

Description

@currentbits

What the CLIs do

Claude Code, Grok Build, and Kimi Code all treat a leading `!` as shell mode. The line is a command in the thread's cwd/worktree, not a prompt. Output comes back in the transcript. Long-running commands can be backgrounded (Claude/Kimi `Ctrl+B`). Kimi 0.20: `!gh auth login` without opening a new terminal.

This is the CLI muscle memory next to drag-drop (#469): grab a command, run it, keep talking to the agent.

Solenta today

The composer `/` palette is three orchestration verbs (#338). There is no `!` token. A shell command is either typed as a prompt (the model may or may not run it) or you leave for a real terminal. #147 is a persistent terminal drawer — a different surface, heavier, and not shipped.

Why it matters

"Run the test I just described" and "gh auth login" should not cost a model turn. People who live in Claude/Grok hit `!` without thinking. Making them prompt the agent (or open #147) is why they bounce back to the TUI for one-shot commands.

Scope

  1. A leading `!` (start of draft, like `commandQuery` for `/`) switches the composer into shell mode: different chrome, Enter runs `sh -c` in the thread worktree.
  2. Stream stdout/stderr into a user-visible tool-style card on the thread (not a fake assistant message). Exit code on the card.
  3. Optional "add to chat" on the card so the next prompt can see the output (Synara's terminal-to-composer).
  4. Timeout + a background/Ctrl+B later. Day one can be foreground-only with a hard cap (60s).
  5. Same path sandbox as the agent (Non-bypassable destructive-action gate outside the trust dials #322). Do not inherit bypass-permissions from the thread.

Out of scope: a full PTY drawer (#147), combining this with queued model turns (#468).

Round 22. Same cluster as #469 (CLI attach/run without a button).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions