Skip to content

agents: add the hermes harness (Hermes gateway) (MARSOHS-2451) - #2083

Merged
SSharma-10 merged 3 commits into
mainfrom
MARSOHS-2451-harness-hermes
Oct 28, 2026
Merged

SSharma-10 merged 3 commits into
mainfrom
MARSOHS-2451-harness-hermes

Conversation

@amandhaw

Copy link
Copy Markdown
Contributor

MARSOHS-2451

Problem

--harness hermes is refused:

$ doctl harness-runtime launch --harness hermes --prompt "..."
Error: Couldn't complete that request
unsupported --harness "hermes"; supported values: opencode, claude-code, codex, codex-agentapi, openhands

hermes is an accepted adapter on the --spec path, and AGENT_KIND_HERMES
is in isSupportedAgentKind's default allow-set. Only the --harness flag map
did not list it.

Change

Add hermes to the map, with the credential wiring that makes the session
usable. A bare map entry is not enough: the gateway's render-config.sh warns
that the first turn will fail when no key and no model are set, which is
exactly what --harness hermes with no other flags would produce.

  • Resolve hermes to the new hermesAgentName, display it as "Hermes", and
    name it in the unsupported-value error.
  • Write HARNESS_INFERENCE_MODEL from the new defaultHermesModel. Hermes has
    no fallback model of its own.
  • Take the managed-key opt-in, as openhands does, so harness-api mints
    HARNESS_INFERENCE_API_KEY. Hermes reads that key when no native
    OPENAI_API_KEY is set. The decision is read off the manifest, so a --spec
    file that says harness: hermes gets the key too.

Hermes does not get the two fields openhands needs:

  • No template pin. templateForAgentKind already resolves the kind to
    coding-hermes, and no flipper gates that template per team (only
    openHandsTemplateName is gated).
  • No keep_warm: false. The server defaults hermes to warm on purpose: the
    gateway is driven over a port-forward tunnel that idle-pause's activity
    tracking cannot see, so pausing would break a live conversation.

One stale comment in knownAgentAdapters is corrected in passing.

Result

$ doctl harness-runtime create --harness hermes --name hm --prompt "test" --dry-run
env:
  HARNESS_INFERENCE_MODEL: openai-gpt-5.5
harness: hermes
name: hm
permissions:
  default: allow

That manifest passes harness-runtime validate with no warnings. --model
overrides the default.

Testing

go test ./commands/ passes. Three tests are added: harness resolution and
display name, the generated manifest shape (model present, no secrets, no
template, no keep_warm), and the managed-key create path.

Not covered: no live session was created, so the minted key and the first turn
are untested end to end.

🤖 Generated with Claude Code

`--harness hermes` was refused with "unsupported --harness", although
`hermes` is an accepted adapter on the `--spec` path. The flag map simply
did not list it.

Add it, with the credential wiring that makes the session usable:

* Resolve `hermes` to the new `hermesAgentName`, display it as "Hermes",
  and name it in the unsupported-value error.
* Write `HARNESS_INFERENCE_MODEL` from the new `defaultHermesModel`.
  Hermes has no fallback model of its own: render-config.sh renders an
  empty model into config.yaml and warns that the first turn will fail.
* Take the managed-key opt-in, as openhands does, so harness-api mints
  `HARNESS_INFERENCE_API_KEY`. Hermes reads that key when no native
  OPENAI_API_KEY is set. The decision is read off the manifest, so a
  `--spec` file that says `harness: hermes` gets the key too.

Hermes does not get the two fields openhands needs. templateForAgentKind
already resolves the kind to coding-hermes, and no flipper gates that
template per team. keep_warm defaults to true server-side on purpose,
because the gateway is driven over a port-forward tunnel that idle-pause
cannot see; writing false would undo that.

Also correct a stale comment in knownAgentAdapters: hermes has been in
isSupportedAgentKind's default set for some time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread commands/agents_run.go
"openhands": openHandsAgentName,
"open-hands": openHandsAgentName,
"hermes": hermesAgentName,
"none": bareSandboxAgent,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is none for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used when the user is not setting any harness specifically, using a bare sandbox

found more info here

// `none` stays the manifest's word for a session with no agent — a --spec

adilhafeez
adilhafeez previously approved these changes Oct 27, 2026
Comment thread commands/agents_run.go Outdated
openAIAgentsAdapter: "Codex",
openHandsAgentName: "OpenHands",
hermesAgentName: "Hermes",
bareSandboxAgent: "Bare sandbox",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while you're at it can you remove "Bare sandbox" and rename it to "Sandbox"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@vneema-do vneema-do left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we remove "none": bareSandboxAgent,

@adilhafeez

adilhafeez commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

should we remove "none": bareSandboxAgent,

@vneema-do none is in use today - that is how we communicate that there is no coding harness and that developers are using just the compute sandbox.

@SSharma-10 SSharma-10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SSharma-10
SSharma-10 merged commit a4bc101 into main Oct 28, 2026
10 checks passed
@SSharma-10
SSharma-10 deleted the MARSOHS-2451-harness-hermes branch October 28, 2026 04:58
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.

4 participants

⌂ 换网址