Skip to content

Run shell commands (!cmd) from the composer #750

Closed

Description

@ivanfenenko

Why

In the TUI and web app you can type !git status to run a quick shell command and have its output land in the session. The app renders session.shell.* events from other clients but cannot start one. On a phone, a one-line command is much faster than opening a terminal.

Current state

  • No call to POST /session/{id}/shell (v1) or POST /api/session/{id}/shell (v2).
  • Shell events are already rendered in Session Chat.

Upstream API

  • v2: POST /api/session/{sessionID}/shell body { command, id? }; output streams as session.shell.* events. Web: packages/app/src/new-session/composer-adapter.ts; TUI: packages/tui/src/component/prompt/index.tsx
  • v1: POST /session/{id}/shell body { agent, command, model? }
  • (/api/shell* standalone commands are out of scope)

App files

  • Android: data/remote/SessionsApi.kt (or MessagesApi.kt), composer submit path, Session Chat composer UI
  • iOS: Data/Remote/SessionsAPIClient.swift / MessagesAPIClient.swift, composer submit path

Acceptance criteria

  • A composer message starting with ! runs as a shell command (clear shell mode indicator, like TUI/web)
  • Works on v1 and v2; output appears through the existing shell rendering
  • Busy session / errors surface the same way as prompt errors
  • Tests for ! parsing and both request shapes

Activity

  1. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions