All plugins

ctxprune

Shrinks tool results before the model reads them, without dropping content: runs of identical lines are counted, JSON record lists with nested values (typical MCP results) become rows on hosted models, read_file/terminal JSON wrappers are unescaped, and every structural rule is kept only if it decodes back to the exact original. patch/edit/memory/todo results are never touched. On claude-opus-* models, an llm_request middleware turns a tool result that repeats an earlier one in the same request into a reference to it. Fails open: on any error or past a 2 s budget Hermes gets the original output. Disclosure — stdlib Python only; no network calls, no shell commands, no child processes, no credentials, no telemetry; rewrites tool results before the model sees them and, on claude-opus-* models, edits repeated tool results in outgoing requests into references; writes a small state store (first-render pins so already-sent results keep their bytes and the prompt cache stays valid, plus a registry of its own outputs) under ~/.cache/ctxprune or $CTXPRUNE_STATE in a 0700 directory shared by all Hermes profiles, and reads only that store and its optional ~/.config/ctxprune/settings.json; CTXPRUNE_OFF=1 disables it.

riceharvestToolsv0.4.1Updated 10 days ago

About

Shrinks tool results before the model reads them, without dropping content: runs of identical lines are counted, JSON record lists with nested values (typical MCP results) become rows on hosted models, read_file/terminal JSON wrappers are unescaped, and every structural rule is kept only if it decodes back to the exact original. patch/edit/memory/todo results are never touched. On claude-opus-* models, an llm_request middleware turns a tool result that repeats an earlier one in the same request into a reference to it. Fails open: on any error or past a 2 s budget Hermes gets the original output. Disclosure — stdlib Python only; no network calls, no shell commands, no child processes, no credentials, no telemetry; rewrites tool results before the model sees them and, on claude-opus-* models, edits repeated tool results in outgoing requests into references; writes a small state store (first-render pins so already-sent results keep their bytes and the prompt cache stays valid, plus a registry of its own outputs) under ~/.cache/ctxprune or $CTXPRUNE_STATE in a 0700 directory shared by all Hermes profiles, and reads only that store and its optional ~/.config/ctxprune/settings.json; CTXPRUNE_OFF=1 disables it.

ctxprune for Hermes (0.4.1, safe-only build)

Lossless rewrite of tool results before they reach the model: runs of identical lines counted, JSON record lists with nested values written as rows on hosted models (each structural rule kept only if it decodes back to the exact original), read_file/terminal JSON wrappers unescaped with every other key kept. patch/edit/memory/todo results are never touched. For claude-opus-* models (or with CTXPRUNE_DEDUP=1): before each LLM call (llm_request middleware) a tool result repeating an earlier one in the same request becomes a reference to it. Stdlib Python, no model, no network.

Generated by ctxprune bundle hermes from ctxprune 0.4.1; don't edit.
The stdlib runtime is vendored in _rt/ (byte copies of the repository's scripts/), so it needs no pip install.

What it does on your machine

  • No network calls, no shell commands, no child processes, no credentials, no telemetry.
  • Hooks: transform_terminal_output, transform_tool_result. Middleware: llm_request (cross-turn dedup, see above).
  • Writes a small state store under ~/.cache/ctxprune (or $CTXPRUNE_STATE) in a 0700 directory: first-render
    pins, so a result that was already sent keeps its bytes and the provider's prompt cache stays valid, and a
    registry of its own outputs. Nothing else is read or written outside this directory.
  • Fails open: on any error, or past the per-call time budget (CTXPRUNE_BUDGET, default 2 s), Hermes gets the
    original output, at most with forged [cp: marker lines escaped.
  • CTXPRUNE_OFF=1 turns it off. hermes plugins disable ctxprune removes it from the pipeline.

What is byte-exact and what isn't, and the measured savings:
README, docs/SAFETY.md.

README from the reviewed commit 10eaef2; 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