Repository navigation
Name a Pi or mini-swe-agent acting agent's event stream in the AHE Evolver's texts - #91
Merged
Merged
Conversation
…ver's texts records.parse_log read every stream but Codex's as Claude Code's, so a Pi stream gave no session id and no usage; it now reads a pi stream with parse_pi. The AHE Evolver's texts named agent-codex.jsonl for a Pi acting agent, whose stream is agent-pi.jsonl; debugger.STREAM_TEXTS now has Pi's wording and command. Each test fails without its fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 of 12 tasks
main's #49 already reads a Pi stream in parse_log (beside mini-swe-agent's), so its line is kept and this branch no longer changes records.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main added agent-mini-swe-agent.jsonl to the streams rollout_stream finds, and the learners' texts still named agent-codex.jsonl for it: this branch's test (every stream but Codex's) fails once main is merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comparison table in docs/methods/ahe_adapter.md listed only Codex's and Claude Code's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pi and mini-swe-agent run no hooks, and the timing breakdown comes from a Harbor trial's trajectory, not from whether a stream has timestamps (Pi's has). Found by the post-PR audit of this table row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iamziyuzhao
marked this pull request as ready for review
November 10, 2026 06:06
Both PRs added to the end of STREAM_TEXTS and at one place in test_ahe_hosts.py, so whichever merged second conflicted. These entries now come before Claude Code's and this test before its neighbour. The table row no longer lists each stream, a list the DeepSeek Harness PR would have left short. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
haizhongzheng
approved these changes
Nov 10, 2026
Member
There was a problem hiding this comment.
Thanks for splitting this out of #90. We reviewed ae01e78 with two independent reviewers, and found nothing that blocks the merge. We made no changes.
What we checked:
- Coverage. Every Codex phrase in
START.md,DEBUGGER.md(the Debugger's question) andbuild_evolution_queryis one of the fourSTREAM_TEXTSpatterns. So a Pi or mini-swe-agent run's texts name no Codex file, stream or command. - Commands. Both match the code:
pi --mode json(hermit/agent/base/cli.py) andpython -m hermit.agent.base.mini_swe_agent_run. - No change for the existing hosts. The Codex and Claude Code texts are unchanged from
main, including the partial-pass and timeout queries. - The new test. It fails with either new entry removed.
- The docs row. The hook claim matches
hook_hosts.HOOK_HOSTS, and the timing claim matchestimings_of(ATIF only). - Merging. The PR merges cleanly into
main(f469f59), and together with #90 (1e75c6f). - Tests.
python -m pytest --changed --base origin/main(core and ahe groups): 856 passed, 76 skipped, 0 failed.
Noted, no change (all already in the description):
- "the one its CLI wrote" is loose for mini-swe-agent, whose stream the framework's own process writes.
- The test checks that the Codex wording is gone and that the file is named. It does not check that each replacement names the right agent.
- On
mainbefore this PR: for Pi and mini-swe-agent, the texts still describe middleware andhook-calls.jsonl, but neither host runs hooks. This is left for the follow-up.
🤖 Generated with Claude Code
haizhongzheng
added a commit
to veoery/hermit
that referenced
this pull request
Nov 10, 2026
…paction usage - The adapter's tools reach an OpenCode acting agent through the Base Agent's tool server: OpenCode 2.2 waits at most 2 s for an MCP server it starts (STARTUP_GRACE_MS) and the adapter's takes ~3 s, so the first request often went without them. hosts/opencode.prepare takes serve_tools; docs say so. - The prompt is OpenCode's stdin, not an argument (E2BIG past 128 KiB). - A binding's extra_body becomes the OpenCode model's options; the effort setting outranks its reasoning_effort. - Usage counts compactions' model calls, which `run --format json` never streams: this call's share of the session's totals in OpenCode's database (read-only, immutable, nothing followed out of the home), a resumed session's earlier totals taken off (_this_call, now with `fields`). - parse_log reads OpenCode's stream by its name. - The AHE Evolver's texts name OpenCode's stream (agent-opencode.jsonl) as they name Pi's and mini-swe-agent's (Infini-AI-Lab#91). - The deployer's docstring gives AGENTS.md discovery's real boundary. Tests: the first request offers the adapter's tools (real binary); a prompt past ARG_MAX; extra_body and effort; compaction usage from a stand-in database and from the real binary (mid-run compaction, then a resume). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 of 11 tasks
haizhongzheng
added a commit
that referenced
this pull request
Nov 10, 2026
…94) * Add opencode as a CLI Base Agent (acting agent and Evolver) * opencode integration bug fixed * opencode: tools from the first request, long prompts, extra_body, compaction usage - The adapter's tools reach an OpenCode acting agent through the Base Agent's tool server: OpenCode 2.2 waits at most 2 s for an MCP server it starts (STARTUP_GRACE_MS) and the adapter's takes ~3 s, so the first request often went without them. hosts/opencode.prepare takes serve_tools; docs say so. - The prompt is OpenCode's stdin, not an argument (E2BIG past 128 KiB). - A binding's extra_body becomes the OpenCode model's options; the effort setting outranks its reasoning_effort. - Usage counts compactions' model calls, which `run --format json` never streams: this call's share of the session's totals in OpenCode's database (read-only, immutable, nothing followed out of the home), a resumed session's earlier totals taken off (_this_call, now with `fields`). - parse_log reads OpenCode's stream by its name. - The AHE Evolver's texts name OpenCode's stream (agent-opencode.jsonl) as they name Pi's and mini-swe-agent's (#91). - The deployer's docstring gives AGENTS.md discovery's real boundary. Tests: the first request offers the adapter's tools (real binary); a prompt past ARG_MAX; extra_body and effort; compaction usage from a stand-in database and from the real binary (mid-run compaction, then a resume). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Haizhong Zheng <hzzheng@umich.edu>
iamziyuzhao
added a commit
that referenced
this pull request
Nov 10, 2026
main gained #91 (the AHE Evolver's texts name a Pi or mini-swe-agent acting agent's stream), #94 (OpenCode as a CLI Base Agent), #97 (hermit deploy retires skills the adapter no longer exports) and #99 (agent skills for this repository). #94 adds OpenCode at the places this branch adds dsh, so 36 files conflicted. Each conflict keeps both sides, OpenCode before dsh: - CLIS, the readers (records.parse_log, trajectory's STREAM_HOSTS, READERS and MARKS, the AHE debugger's STREAM_TEXTS) and every list of CLIs name both, dsh last; cli.py's Dsh part follows OpenCode's; - main's NO_LOGIN replaces this branch's tuples in login.py, isolate.py and acting/workspace.py, and gains "dsh"; - a comment that no longer fits 120 columns with both names is on its own line; - docs: both names in each list. docs/methods/agent.md's dsh learner now "signs in as the pi learner does", since OpenCode's sentence stands between them; in docs/methods/ahe_adapter.md, #91's general wording ("the one its CLI wrote") replaces this branch's list of streams. dsh does not call #97's check_skills and retire_skills yet; the next commit does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Change
The AHE Evolver's texts (
START.md,DEBUGGER.md, the evolution query, the Debugger's question) name the actingagent's event stream.
debugger.STREAM_TEXTShad only Claude Code's wording, so with a Pi or mini-swe-agent actingagent they named
agent-codex.jsonl, which is not there (rollout_streamfindsagent-pi.jsonloragent-mini-swe-agent.jsonl). They now name that agent's stream and the command that writes it (pi --mode json,python -m hermit.agent.base.mini_swe_agent_run). The comparison table indocs/methods/ahe_adapter.mdno longer saysthe stream is only Codex's or Claude Code's, and claims the hook audit only for the hosts that run hooks.
records.parse_logis not changed here: #49 made it read a Pi stream as Pi's while this PR was open. The PR keeps atest of that line, which had none.
Found while adding DeepSeek Harness (#90) and split out of it, so that #90 changes only dsh. #90 adds its own entry
after Claude Code's in
STREAM_TEXTS; these come before it, so the two PRs merge in either order without a conflict.Validation
At
ae01e78(mainatf469f59merged):tests/methods/ahe/test_ahe_hosts.py::test_the_evolvers_texts_name_every_acting_agents_stream_it_reads: for everystream but Codex's (Claude Code's, Pi's, mini-swe-agent's),
START.md,DEBUGGER.mdand the evolution query nameno Codex file, stream or command,
START.mdnames that stream, andDEBUGGER.mdnames Pi's and mini-swe-agent'scommands.
tests/core/test_pi_agent.py::test_a_pi_stream_is_read_back_by_its_name_or_by_its_events:parse_logon therecorded
tests/fixtures/pi/success.jsonlwithpigives the stream's session and its 4 calls (4,000 input and 80output tokens).
STREAM_TEXTSentries, each of their four replacements, and Pi's reader inparse_log(11 of 11).--integration, split over six containers: 3 failed, 1325passed, 70 skipped.
mainatf469f59split over five: 3 failed, 1324 passed, 70 skipped. The same three testsfail and the same tests skip. Two fail as root (
test_isolate::test_a_rollout_sees_what_is_declared_and_nothing_else,test_ahe_hook_runner::test_logs_that_cannot_be_written_lose_the_line_not_the_call). The third(
test_ahe_evolver::test_the_evolve_prompt_is_start_md_and_the_query) fails only in a split run, for lack of~/.cache/hermit-tests, and passes withtests/methods/ahein onepytest.hermit check,trainandevalondocs/_examples/first_training/run.yamlpass, andbash docs/build-pages.sh(Sphinx with
-W) succeeds.1e75c6f:mainand the two PRs merge without a conflict in either order, to the same tree. That tree'sfull suite, split over six containers: 3 failed, 1374 passed, 70 skipped, the same three tests. The every-stream test
passes there for dsh's stream too (its file name and no Codex wording; Add DeepSeek Harness (dsh) as a CLI Base Agent (acting agent and dsh Evolver) #90's own test holds its command).
for_streamgivesthem to the learners, from the method's own files and
build_evolution_query, not through a whole Evolver run.Review
comparison table in
docs/methods/ahe_adapter.md; no document namesparse_logorSTREAM_TEXTS.the Codex wording, as before.
debugger.py.The sandbox checklist does not apply: no process is started and no sandbox changes.
build_evolution_query, not awhole Evolver run (see Validation).
parse_logon a stream the real Pi recorded; it has no caller in a run(
hermit.agent.evolver.agentre-exports it, and a Pi session goes throughPi.parse).tests/methods/ahe/,tests/core/), named for thebehaviour, and fails without what it covers. The added lines write no file and need no CLI or network (the Pi test's
earlier lines copy the fixture into
tmp_path). Each test takes well under a second.ae01e78.63a781fagainst the general, test and sandboxchecklists, including a Trainer step on hand-written Pi- and mini-swe-agent-shaped streams with stand-in learners,
in which the right stream and command reached the learners. It then re-checked
0de3891(the table row and thisdescription) and
ae01e78(the entries' and the test's new places, the table row, and merging with Add DeepSeek Harness (dsh) as a CLI Base Agent (acting agent and dsh Evolver) #90 in eitherorder, squash merges included): no high or medium finding in this PR's diff or description, or from merging the two.
0de3891. Left, onmainbefore this PR and not changed by it:START.mddescribes middleware andMEMORY.mdthrough
session_start, and it and the evolution query namehook-calls.jsonl, without saying that neither hostruns hooks; on mini-swe-agent the hook command its deployment lists does nothing (
hook_hosts.HOSTShas no suchhost), so
MEMORY.mdnever arrives; the template'sEVOLVER.mddoes not mention mini-swe-agent. This PR renames afile in those sentences; changing what a learner is told to do on a host without hooks is left to a follow-up.
statements in this description.
the right agent or how
rollout_streamchooses the stream (the audit's Trainer step exercised both once).With the follow-up above:
EVOLVER.md's note on where the stream is names only Codex's and Claude Code's files,and
docs/methods/ahe_adapter.mdsays each rollout's log holdshook-calls.jsonlandhook-state/. In the tablerow, "the one its CLI wrote" is loose for mini-swe-agent (the framework's own process writes that stream), and
"one file per standard step" does not hold for a Harbor trial with only
agent/codex.txt.🤖 Generated with Claude Code