mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-17 19:32:45 +03:00
Child cache marker: real-loop check
Does a subagent whose task text differs from its sibling's still read the session prompt (skills index and footer) from the provider cache on its first call, and does a sibling with identical task text keep reading everything?
launch.py <arm> <out.jsonl> <rep> <tree>: resolves the Nous route under the real home and startsworker.pywith the key passed by environment only. Run it withPYTHONPATH=<tree>and the tree's interpreter.worker.py: tempHERMES_HOMEwithisolate_host, a repo-shaped workspace carrying anAGENTS.md, and three subagent-shaped agents whose system prompt carries a hand-built per-session tail (not the real delegate prompt builder), run one after another: A, then B with different task text, then C with A's task text. Each does a small real task with real tools. Per-call prompt, cache-read and cache-write tokens come from the agent's own usage accounting.
A fresh temp home has no skills, so the session prompt here is small; the size of the saving on a real library is measured separately with captured payloads (see the PR that added this directory).
Reference run (anthropic/claude-fable-5.2 on the Nous chat route, 3 runs per arm)
First call of each child, (prompt, cache read, cache write), identical across the three runs to within
10 tokens:
| child | main | this change |
|---|---|---|
| A, first in the run | 11,881 / 6,354 / 5,523 | 11,886 / 6,354 / 5,528 |
| B, different task text | 11,887 / 6,354 / 5,529 | 11,892 / 6,783 / 5,105 |
| C, same task text as A | 11,881 / 11,776 / 101 | 11,886 / 11,781 / 101 |
Every child completed its task (9 of 9 per arm), and every second call read the whole first call (for example 11,877 of 12,353) on both arms.