Repository navigation
Read a Pi acting agent's event stream as Pi's in parse_log and the AHE Evolver's texts - #91
Draft
iamziyuzhao wants to merge 1 commit into
Draft
iamziyuzhao wants to merge 1 commit into
iamziyuzhao wants to merge 1 commit into
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>
9 of 12 tasks
This branch has not been deployed
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
Two places that read an acting agent's event stream by the CLI that wrote it did not know Pi's (#89):
records.parse_log(log, backend, model)read every stream but Codex's as Claude Code's, so a Pi stream(
pi --mode json) gave no session id and no usage. It now reads apistream with Pi's own reader (parse_pi).No hermit code calls it during a run (each CLI agent reads its own stream);
hermit.agent.evolver.agentre-exports it for a method's code.
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 acting agent they namedagent-codex.jsonl, which is not there (rollout_streamfindsagent-pi.jsonl). They now name Pi's stream andits command (
pi --mode json).Found while adding DeepSeek Harness (#90) and split out of it, so that #90 changes only dsh. #90 adds its own
entries beside these two (a one-line overlap in each place).
Validation
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 and80 output tokens).
tests/methods/ahe/test_ahe_hosts.py::test_the_evolvers_texts_name_every_acting_agents_stream_it_reads: forevery stream but Codex's (Claude Code's, Pi's),
START.mdandDEBUGGER.mdname that stream and no Codex file orcommand.
--integration: 2 failed, 1165 passed, 85 skipped. Onmainthe same run gives 2 failed, 1164 passed, 85 skipped: the same two tests, which 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).Review
no document names
parse_logor these texts.parse_logkeeps its signature; an unknownbackend's stream is still read as Claude Code's.
hermit/agent/base/records.py(parse_log) and the AHE method'sdebugger.py, both for aPi acting agent.
parse_logon a stream the real Pi recorded; the AHE texts as thelearners read them.
🤖 Generated with Claude Code