All plugins

headway

Proof-of-progress circuit breaker: different commands are not necessarily progress. Watches local terminal, file-mutation, and read/search calls for unchanged bounded workspace fingerprints, no new normalized result evidence, and no expanded read coverage. Injects a structured recovery packet after configurable no-progress streaks; optional enforce mode blocks subsequent same-class calls without executing them. Distinct from exact/near-identical argument guards, consecutive-failure escalation, tqdm rendering cleanup, and undo/snapshot plugins. Registers tool_execution middleware, pre_llm_call, /headway status/reset/mode, and hermes headway status; no model-facing tools, dashboard API, or Desktop pane. Stores atomic session/workspace JSON under Hermes plugin data dir. No network, credentials, self-updater, core patches, shell, or git use in production code; scripts/demo.py alone uses subprocess for real local terminal commands. Large-file/total/file-count sampling is bounded and can miss changes; remote/external side effects are not claimed as observed progress.

hanii090Toolsv0.1.0Updated 1 hour ago

About

Proof-of-progress circuit breaker: different commands are not necessarily progress. Watches local terminal, file-mutation, and read/search calls for unchanged bounded workspace fingerprints, no new normalized result evidence, and no expanded read coverage. Injects a structured recovery packet after configurable no-progress streaks; optional enforce mode blocks subsequent same-class calls without executing them. Distinct from exact/near-identical argument guards, consecutive-failure escalation, tqdm rendering cleanup, and undo/snapshot plugins. Registers tool_execution middleware, pre_llm_call, /headway status/reset/mode, and hermes headway status; no model-facing tools, dashboard API, or Desktop pane. Stores atomic session/workspace JSON under Hermes plugin data dir. No network, credentials, self-updater, core patches, shell, or git use in production code; scripts/demo.py alone uses subprocess for real local terminal commands. Large-file/total/file-count sampling is bounded and can miss changes; remote/external side effects are not claimed as observed progress.

Headway

Different commands are not necessarily progress.

Headway is a proof-of-progress circuit breaker for Hermes Agent. It watches local terminal, file-mutation, and read/search calls. When superficially different calls produce no new observable evidence, no workspace change, and no new read coverage, it gives the agent a structured recovery packet.

pwd                  -> no state change
ls -la               -> no state change
git status --short   -> no state change
run parser check     -> same evidence
                         HEADWAY: change the hypothesis, verify differently,
                         delegate_task, or ask the user

write_file(app.py)   -> workspace hash changed -> streak reset

No LLM judge. No command-similarity heuristic. No network. Version 0.1.0, MIT.

Why not core loop guardrails?

Hermes issue #67889 describes terminal thrashing that exact-argument hashes miss. Exit code 0 is not progress, and terminal is excluded from idempotent_no_progress. Headway addresses that observable gap:

Nearby toolPrimary signalHeadway's difference
degeneracy-guardArgument repetition -> approvalDetects different arguments with unchanged state/evidence
escalation-governorConsecutive failures / identical callsAlso catches successful-looking no-progress calls
progress-squashtqdm carriage-return collapseUnrelated terminal rendering
Chronos / Rewind / undo-effects / git-autosaveUndo, checkpoints, snapshotsHeadway intervenes before more thrashing; it does not restore state
Near-identical-loop work (PR #103180)Fuzzy/near-identical command similarityObservable progress + evidence novelty, not command similarity alone

These claims are the product motivation supplied with this build; verify the upstream issue/PR before quoting them in submission copy.

Install

Local checkout:

# Hermes discovers the root as a package; do not copy only the headway/ subfolder.
cp -R /workspace/hermes-headway ~/.hermes/plugins/headway
hermes plugins enable headway
# Restart the gateway/session after installing or enabling.

From a published repository (after the owner publishes it):

hermes plugins install hanii090/headway-hermes-plugin --enable

Configuration uses plugins.headway.* / the plugin's ordinary ctx.get_config values. Defaults:

KeyDefaultMeaning
warn_after4Append a recovery notice at this no-progress streak
intervene_after6Inject intervention; in enforce mode, subsequent same-class calls are blocked
modeadvisoryadvisory: append packet; enforce: block subsequent same-class no-progress calls
warmup_calls2Initial observed calls exempt from no-progress streak
evidence_window40Recent normalized result hashes per session/workspace
tried_limit8Recent signatures included in packet
max_file_bytes1,000,000Per-file content sample cap
max_total_bytes20,000,000Total content bytes per fingerprint
max_files10,000Maximum paths per fingerprint
goal_limit240First-user-goal characters in recovery packet

Commands

/headway                    JSON status for this session
/headway status             same
/headway reset              release streak and same-class enforcement
/headway mode advisory      inject notices only (session-local)
/headway mode enforce       block subsequent same-class thrashing
hermes headway status       JSON for default session
hermes headway status SID   JSON for a named session

pre_llm_call captures the first user message as the goal hint and treats each later user turn as an explicit hypothesis/goal boundary. It does not rewrite or inject into the user's message.

Headway has no dashboard API or Desktop pane. Use /headway status in the running session.

Decision algorithm

For tracked tools (terminal/execute_code/shell/run_command, write_file/patch/file_edit and related mutations, read_file/search_files/grep/glob/list_files):

  1. Before: hash sorted relative paths, file sizes, and bounded file-content samples under the session workspace (or explicit terminal workdir). Ignore .git, node_modules, .venv, __pycache__, and .hermes; do not follow symlinks.
  2. Call next_call(args) exactly once, except a deliberate enforce-mode short circuit.
  3. After: repeat the workspace hash. Normalize result text by removing ANSI escapes, timestamps, PIDs, durations, UUIDs, absolute workspace prefixes, and excess whitespace; hash it.
  4. Classify, in order:
    • state_changed: before/after workspace digest differs;
    • coverage_expand: a successful read/search covers a previously uncovered path or line interval;
    • new_evidence: normalized result was not seen in the bounded evidence window;
    • no_progress: none of those. Timestamp/PID-only poller output is not new evidence.
  5. Reset the streak on the first three classes, a later user message, or /headway reset. Otherwise increment after warmup. Keep separate terminal/mutation/read streaks for enforce-mode blocking.

The recovery packet contains goal_hint, the last workspace unchanged short id, recent tried tool signatures, required recovery options (materially different hypothesis, verification step, delegate_task, ask user), and the exact reason. Advisory mode appends human text plus one-line JSON to string results. Enforce mode returns a blocked-result packet without invoking the tool.

A real mutation can recover a terminal streak. Recovery tools such as delegate_task and ask_user are not blocked, but they must actually produce new evidence/change state to clear the streak.

Demo

python3 scripts/demo.py
# optional: python3 scripts/demo.py --keep /tmp/headway-demo

The demo runs real pwd, ls, git status, and Python terminal commands inside a temporary workspace via the actual plugin middleware. Their evidence is deliberately held constant so the test isolates progress from command novelty; exit status is ignored. It asserts an intervention packet, then performs a real write_file mutation and asserts a zero streak. It exits 0 only when both proofs pass.

Tests

python3 -m pytest -q
python3 scripts/demo.py

Unit tests require only Python 3.10+ and pytest; no Hermes installation or LLM is used. The adapter uses the documented public middleware/hook/command/CLI contracts. The demo's terminal runner uses Python subprocess; the plugin engine itself never invokes a shell or git.

Disclosure and limits

  • Registers: one tool_execution middleware, one pre_llm_call hook, /headway, hermes headway status. No model-facing tools and no core patches.
  • Reads: workspace paths and bounded file contents for hashing; tool results for normalized evidence. Session goal (truncated) is retained in plugin state.
  • Writes: atomic per-session/per-workspace JSON under Hermes plugin_data_dir("headway"). The demo and tests redirect writes to temporary directories. No plugin state is written into the measured workspace. No credentials, network, self-updater, or subprocess/git use in production code.
  • Sampling: large files use bounded head/tail samples, so a mid-file change outside those samples can be missed. Total/file-count caps also make fingerprints partial. This is deliberate bounded work, not a cryptographic whole-workspace guarantee.
  • Scope: local filesystem only. Explicit TERMINAL_ENV values other than local/host are skipped because local hashes cannot prove remote state. Commands that write outside the selected workspace, send messages, mutate remote services, or only return new output cannot be observed as external state changes.
  • Result format: string results receive recovery text. Structured non-string results are preserved; a notice is logged rather than corrupting the result type.
  • Concurrency: atomic file replacement protects readers from partial JSON; this version does not provide multi-process session locking. Enforce mode is a circuit breaker, not an authorization sandbox.
  • CLI: persisted session state is available; an external CLI without a live plugin context may show a zero/unbound status rather than the gateway's in-memory workspace. Desktop is intentionally omitted.

README from the reviewed commit 9744b0c; it updates when the author re-pins.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section