Build Codex and Hermes commands from their own interfaces - #80
Merged
Conversation
The launcher marked the GPT Codex and Hermes Agent flag sets as taken from a published interface rather than read from the tool, and warned about it in the form. The warning was right: codex 0.153.4 answers `--full-auto` with "unexpected argument", so a full-auto Codex session started from the browser could only fail on the machine it was sent to. Both tools were installed and their interfaces read, and every option offered here now parses against the real binary: - Codex resumes by id or `--last`, and exposes `--sandbox`, `--ask-for-approval` and `--search`. Options follow `resume <id>`, which is where the subcommand accepts them. - Hermes takes a subcommand, `--resume`, `--continue`, `--model`, `--worktree` and `--yolo`, replacing a free-text argument box. Two ordering rules the parsers impose are now encoded and tested. Hermes options belong to the top-level parser, so they precede the subcommand: `hermes sessions --yolo` is an error. And a bare `--continue` takes an optional value, so it swallows whatever follows; it is emitted last, and only when no subcommand and no explicit session could be eaten by it. With nothing left that was guessed, the warning goes too. Discovery is unchanged: the ids were already in the CLI's detection table, the accounts service's accepted set, and the browser's catalogue.
Alexgodoroja
force-pushed
the
codex-hermes-verified-flags
branch
from
September 9, 2026 03:18
c70dc6b to
89476d7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The new-session form carried a warning on GPT Codex and Hermes Agent: "These flags come from the published interface for … rather than from its own help output, so check the command below before starting."
The warning was accurate.
codex --full-autois not a flag in current Codex:So the one non-default option the form offered for Codex built a command that could only fail on the machine it was sent to, after the round trip through
POST /api/commandsand the agent poll.Rather than keep the warning, I installed both tools, read their real interfaces, and rebuilt the two kinds so there is nothing left to warn about. Codex and Hermes now sit at the same bar as Claude Code and OpenClaw.
Verified against
codexnpm i -g @openai/codexhermesuv tool install hermes-agentEvery option offered by the two builders parses against the installed binary. All 17 command shapes the builders can produce were generated from the shipped
build()functions and run against the real CLIs: 17/17 accepted.Codex
Dropped
--full-auto. Added, all read fromcodex --helpandcodex resume --help:--last--sandbox—read-only/workspace-write/danger-full-access--ask-for-approval—on-request/never--searchOptions follow
resume <id>, which is where the subcommand accepts them, so one order works for a fresh and a resumed run.Hermes
Replaced the free-text argument box with real controls: a subcommand picker,
--resume,--continue,--model,--worktree,--yolo.Two ordering rules the parser imposes are encoded and tested:
hermes sessions --yoloiserror: unrecognized arguments: --yolo;hermes --yolo sessionsis fine.--continuetakes an optional value, so it is greedy — inhermes --continue sessionsthe subcommand is read as the session name to resume. It is emitted last, and only when no subcommand and no explicit session could be eaten by it.Discovery
Unchanged, and already correct:
codexandhermeswere present incmd/shell/harness.go, inKNOWN_HARNESSESinapp/server/app.ts, and inDETECTED_HARNESSESinapp/src/lib/harnesses.ts. Confirmed end to end on a machine with all four installed —installedHarnesses()returns[claude-code codex hermes openclaw], and the "not found on this machine" note still renders for a machine that reports without them.Tests
session-kinds.test.tscovers both builders: resume precedence, empty selects meaning "no flag", option ordering, and the--continueguard. The catalogue test that asserted which kinds were built from a published interface is replaced by one asserting no builder can emit--full-auto.npm run check(root) — passnpm testinapp/— 616 passed, 3 skippednpm run typecheck,oxlint— clean, no new warningsgo test -race ./...,go vet ./...,gofmt -l— cleannpm run build:web— buildsThe modal was also driven in a browser to confirm the live command preview matches the builders and the warning is gone.
Note:
npm run buildinapp/fails atcheck-bundlefor want ofVITE_FIREBASE_*. That reproduces onmainon a machine with no.env.localand is unrelated to this change.