Skip to content

hermes chat -q now stays interactive: TTY prompts seed a live session, submitted literally (Omarchy prompted launches) - #97121

Merged
teknium1 merged 1 commit into
mainfrom
feat/seeded-interactive-query
Aug 28, 2026
Merged

hermes chat -q now stays interactive: TTY prompts seed a live session, submitted literally (Omarchy prompted launches)#97121
teknium1 merged 1 commit into
mainfrom
feat/seeded-interactive-query

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

hermes chat -q "…" on a real TTY now seeds a live interactive session with the prompt submitted literally as the first turn — instead of answering and exiting — in both the classic CLI and the TUI. This gives OS launchers and desktop integrations (Omarchy's prompted agent terminals, omacom/omarchy#8705) the "start interactive, seeded with this prompt" mode other coding agents have, without the oneshot→usage-file→resume workaround they were about to ship.

Literal means literal: the seeded prompt is never parsed as a slash command, ! shell escape, $(...) interpolation, or file-drop — it goes straight to the model, matching --oneshot's existing semantics.

Changes

  • cli.py: TTY -q/--image invocations route into run() with a _SeededQueryMessage sentinel; process_loop skips slash/!/file-drop dispatch for that one message. New _should_seed_interactive() gate.
  • hermes_cli/_parser.py: new hermes chat --oneshot flag (dest oneshot_exit, distinct from top-level -z/--oneshot PROMPT whose dispatch sites pass the value as the prompt) for the legacy answer-and-exit behavior.
  • ui-tui: STARTUP_QUERY now submits through a new submitLiteral path (useSubmissionsubmitPrompt(..., { skipDetectDrop: true })) that bypasses dispatchSubmission and the input.detect_drop rewrite.
  • Docs: website/docs/reference/cli-commands.md chat-options table + examples updated.
  • Tests: tests/hermes_cli/test_seeded_interactive_query.py (13 cases) + 2 new vitest cases in submissionCore.test.ts.

Legacy behavior preserved

Surface Behavior
hermes chat --oneshot -q answer + exit (explicit opt-in)
-Q/--quiet answer + exit (machine-readable contract)
non-TTY stdio (kanban, cron, pipes, A2A) answer + exit
top-level hermes -z "…" unchanged

Validation

Live surface Before After
CLI chat -q "PONG" (tmux TTY) answered + exited answered, session stays live at prompt
CLI chat -q '!echo INJECTED' (new path) reaches model as literal text, no client shell dispatch
CLI chat -q '/help' (new path) sent to model as prompt, not slash-routed
TUI --tui -q '!echo INJECTED' client ran the shell command locally submitted verbatim as a user prompt
TUI --tui -q '/help …' slash-dispatched submitted verbatim
chat -q piped (non-TTY) answer + exit answer + exit (unchanged)
chat --oneshot -q on TTY n/a answer + exit

Unit: 22 passed (tests/hermes_cli/…), full ui-tui vitest suite 1370 passed, tsc --noEmit clean, ruff clean.

Infographic

Seeded sessions stay live

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 07330bb — feat(cli/tui): -q now seeds a live interactive session; prom

⚠️ Warnings

OSV vulnerability scan · View job

6 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 3m24s vs 4m33s (-25.3%). 5 job(s) slower, 6 faster, 3 unchanged.

  • Python tests / Run tests: -43.0s
  • JS & TS checks / JS & TS checks: -30.0s
  • Docs Site / docs-site-checks: -11.0s
  • Python tests / e2e: +7.0s
  • Python lints / ruff enforcement (blocking): -7.0s

…t literally

On a real TTY, `hermes chat -q "…"` (and `--tui -q`) now starts a normal
interactive session with the prompt submitted literally as the first turn —
no slash-command routing, no '!' shell dispatch, no $(...) interpolation,
no file-drop rewriting — matching how other coding agents handle seeded
launches (Omarchy prompted agent terminals, omacom/omarchy#8705).

Legacy answer-and-exit is preserved everywhere automation depends on it:
- new `hermes chat --oneshot` flag (distinct dest from top-level -z)
- -Q/--quiet machine-readable contract
- any non-TTY stdio (kanban workers, cron, pipes, A2A)
- top-level `hermes -z` unchanged

CLI: seeded prompt rides a _SeededQueryMessage sentinel through
process_loop, which skips the slash/!/file-drop dispatchers for that one
message. TUI: STARTUP_QUERY submits via a new literal path (submitLiteral)
that bypasses dispatchSubmission and the input.detect_drop rewrite.
@teknium1
teknium1 force-pushed the feat/seeded-interactive-query branch from cb511b4 to 07330bb Compare August 28, 2026 12:10
@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have labels Aug 28, 2026
@teknium1
teknium1 merged commit a5c7eed into main Aug 28, 2026
38 checks passed
@teknium1
teknium1 deleted the feat/seeded-interactive-query branch August 28, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants