Skip to content

Add full Hermes Agent ACP harness support - #12

Open
juanmiret wants to merge 3 commits into
zeronsh:mainfrom
juanmiret:comet/hermes-agent-full-support
Open

Add full Hermes Agent ACP harness support#12
juanmiret wants to merge 3 commits into
zeronsh:mainfrom
juanmiret:comet/hermes-agent-full-support

Conversation

@juanmiret

@juanmiret juanmiret commented Aug 3, 2026

Copy link
Copy Markdown

Summary

Adds full Hermes Agent support over ACP/JSON-RPC, including model and mode discovery, streaming events, tool calls, approvals, steering, interruption, resume behavior, and coverage with a fake Hermes fixture.

Why

Allows Comet to use Hermes Agent as a first-class harness alongside Claude and Codex.

Validation

  • cargo fmt --all -- --check
  • cargo test -p comet-harness
  • 52 unit tests passed
  • Claude, Codex, Hermes, and shell-resolution integration suites passed
  • Live Hermes CLI test skipped because it requires a configured Hermes installation and network

The branch is rebased onto zeronsh/comet:main; the follow-up compatibility fix updates Hermes to the current shared child-PATH helper.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

juanmiret and others added 3 commits August 3, 2026 14:17
Adds Hermes Agent (NousResearch/hermes-agent) as a first-class harness,
driven through `hermes acp` — the Agent Client Protocol stdio server Hermes
also serves to Zed/VS Code/JetBrains. Because ACP runs the same agent core
as the CLI and the Electron desktop app, Comet sessions inherit the device's
~/.hermes config, skills, memory, and session history.

Every wire shape here was captured from a live `hermes acp` 0.19.1 session
rather than inferred, including the fixtures the tests replay.

- crates/harness/src/hermes/: initialize handshake (no client-side fs/terminal
  capability — Hermes owns its tools), session/new + session/load, prompt,
  cancel, and the session/update stream. session/load replays the whole prior
  transcript before responding, so replays are drained concurrently and
  dropped: Comet's doc already holds those parts, and a long history would
  otherwise fill the incoming channel and deadlock the response.
- Live model catalog: Hermes's models are whatever providers are authenticated
  on the device, so they come from session/new (cached 5min) instead of a
  curated snapshot. No per-turn effort knob exists over ACP, so the reasoning
  ladder is deliberately empty.
- Steering: a mid-turn session/prompt is redirected into the running turn by
  Hermes's core (verified live). Its ack resolves immediately and is NOT a turn
  end — in-flight state tells them apart — and the "Redirected the active
  turn…" text Hermes streams as assistant output is swallowed so it can't land
  in the transcript.
- Tool normalization: Hermes omits rawInput for its "polished" tools, so
  operands come from its deterministic title prefixes, locations[], and content
  blocks (the `$ cmd` block wins over the title, which truncates at 80 chars).
- Permissions bridge session/request_permission to RunControls::request_input;
  sandbox level + auto_approve map onto Hermes's edit-approval session modes.
- codex/rpc.rs → jsonrpc.rs: the stdio JSON-RPC client is now shared by both
  the Codex app-server and Hermes ACP adapters.
- Registry slot, harness picker mark, COMET_HARNESS=hermes, docs.

Tests: 12 integration tests against a fake ACP server (tests/fixtures/
fake-hermes.sh) plus unit tests, and an #[ignore]d end-to-end test against a
real installed hermes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@juanmiret
juanmiret marked this pull request as ready for review August 3, 2026 17:48
@juanmiret

Copy link
Copy Markdown
Author

@wingleeio let me know if this is something you'd like to have, and what would be required for this PR to get merged. Cheers!

@wingleeio

Copy link
Copy Markdown
Contributor

hermes support in comet is definitely something i'd like to have

right now i'm considering how i want to handle acp, ideally acp would be introduced to comet in a way that it's easy to add other acp compatible harnesses afterwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants