Skip to main content

Hermes Blind

Recover the original goal of a long Claude Code or Codex session—and add evidence constraints to evaluation prompts.

PyPI Python CI License: MIT Status: experimental

Long agent sessions can lose the shape of the request that started them. Hermes Blind reads the first user turn from a local Claude Code or Codex JSONL log and writes a compact recovery anchor you can inspect and paste back into the session. It also provides a small prompt wrapper for evaluations that asks the model to disclose prior exposure, quote its evidence, and hedge when the evidence is thin.

The package is deterministic, dependency-free at runtime, and local: it makes no model calls and sends no network requests.

Install

For the isolated command-line app:

pipx install hermes-blind

Or install it into your current Python environment:

python -m pip install hermes-blind

Requires Python 3.10+.

Recover a long agent session

The lowest-friction path is to give your coding agent this instruction:

Install hermes-blind. Find the JSONL log for this Claude Code or Codex session, then run hermes-blind apply --session <path> --format auto --turn <current-turn-number> --out recovery.md. Show me the generated anchor and use it to restate my original goals before continuing. Do not overwrite files or share the session text.

Or run it directly:

hermes-blind apply \
  --session /path/to/session.jsonl \
  --format auto \
  --turn 9 \
  --out recovery.md

The generated markdown starts like this:

# Recovery scaffold (anchor-extracted from turn 1, applied at turn 9)

## Original anchor
- stated_goal: "Ship the onboarding flow and verify the clean install"

## Session state
- session file: rollout.jsonl
- user turns observed: 9

--format auto recognizes Claude Code and Codex JSONL shapes. The default goals mode preserves up to 12 goal-carrying sentences from the first user turn; first-sentence keeps the compact legacy behavior and full includes up to 4,000 characters.

The --turn value is only a label in the output. Hermes Blind does not detect drift or decide when recovery is needed. Existing output files are preserved unless --force is explicit, and the input session file can never be used as the output path.

Recovery files include user-authored text. Inspect them before sharing.

Add evidence constraints to an evaluation prompt

From the CLI:

hermes-blind apply \
  --variant v1 \
  --prompt "Score this release from quoted evidence."

This prints a wrapped prompt without calling a model:

[HERMES-BLIND]
If you have prior exposure to this target or its author, state it in one line.
Score using only quoted evidence from the target text below.
Unknown or thin evidence = hedge; do not confabulate.
[/HERMES-BLIND]

Score this release from quoted evidence.

Or use the Python API:

from hermes_blind import wrap

prompt = wrap(
    "Rate this paper on novelty from 0 to 10 and cite the target text.",
    variant="v1",
)

Available variants are null, micro, short, v1, full, placebo, and gate-only. The null variant is an exact no-op for controlled comparisons. The package also exposes the dependency-free intent and scope preambles used by Hermes Rubric.

Evidence and limits

The repository tests and CI cover deterministic wrapping, Claude Code and Codex JSONL parsing, recovery modes, safe output handling, package installation, and CLI invocation.

A frozen nine-session extraction audit found that the default goal-set anchor represented 40 of 66 pre-listed goals, compared with 7 of 66 for the earlier first-sentence heuristic. That supports better mission representation in the generated artifact for the evaluated sessions. It does not establish that reinserting the artifact changes model behavior or improves task outcomes. See the evaluation report for the method, limitations, sanitized results, and receipt hashes.

Not established:

  • reliable bias reduction from the evaluation prefix;
  • successful behavioral recovery after inserting an anchor;
  • automatic drift detection or an optimal intervention turn;
  • adversarial prompt-injection resistance; or
  • non-English behavior.

Treat the output as a transparent scaffold for a human or agent to inspect, not as a security boundary or independent evaluator.

Development

python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
ruff check src tests
pytest -q
python -m build
twine check dist/*

See the changelog for release history and the contribution guide for contribution guidance.

License

MIT. See the license.

Built by Hermes Labs.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_blind-0.1.4.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_blind-0.1.4-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file hermes_blind-0.1.4.tar.gz.

File metadata

  • Download URL: hermes_blind-0.1.4.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hermes_blind-0.1.4.tar.gz
Algorithm Hash digest
SHA256 03659438abf56148ac0e6ba6d12371970d39678c2e571eb80b62988c0681e5a2
MD5 63768bc33121e2466c73fe836bd0e678
BLAKE2b-256 c3aeeae1e7550d4df25a8a9b77d79c50d3f19106c9d28f13042d459d3aa0a1fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_blind-0.1.4.tar.gz:

Publisher: publish.yml on hermes-labs-ai/hermes-blind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermes_blind-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: hermes_blind-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hermes_blind-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ebf9b861a46a1ff7766faea0accd07eccf7baaee243f3fb5810ac3c44d968d9a
MD5 97b3252da574ff4f156fa8a7e3255dd9
BLAKE2b-256 2ecb0a955724015ef0dd480f2bd4b4912471b8d7dcd4d6ebb07230617cd97205

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_blind-0.1.4-py3-none-any.whl:

Publisher: publish.yml on hermes-labs-ai/hermes-blind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 files

0.1.3

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page