fix(meta_agent): wire eval_path and iterations_left into agent instruction#32
Open
j-arndt wants to merge 1 commit into
Open
fix(meta_agent): wire eval_path and iterations_left into agent instruction#32j-arndt wants to merge 1 commit into
j-arndt wants to merge 1 commit into
Conversation
… parameters into the agent instruction; add unit tests
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.
Summary
Fixes #30:
MetaAgent.forwarddeclared and documented twoparameters —
eval_pathanditerations_left— that were silently dropped inthe method body. The agent received the same one-line instruction every
iteration regardless of what callers passed in.
This PR wires both parameters into the instruction string so the agent can
(a) locate prior evaluation results and read them with its existing tools,
and (b) reason about its remaining iteration budget when choosing exploration
vs. exploitation.
Why this is the right fix
The smallest possible change that actually uses the parameters as documented.
Three properties make it minimal:
EvalContext, noPromptScaffold, no archiveparser. The agent already has
tools_available='all'(which includes thebash and edit tools); telling it where prior results live is sufficient.
in
eval_path— that would lock the framework to a specific archiveschema and is the wrong place to make that decision. The agent reads what
it needs at runtime via its tools.
unchanged. Existing callers (e.g.
run_meta_agent.py) work unmodified.Behavior change
Before — instruction was identical every iteration:
After — instruction includes the eval location and remaining budget when
provided:
When
eval_pathis falsy oriterations_leftisNone, the correspondingsection is omitted — so callers who don't pass either get the original
single-line instruction unchanged.
Backward compatibility
None).iterations_left=None(the documenteddefault) produces no iteration hint.
run_meta_agent.pyand other callers require zero modifications.Out of scope
A few related observations I noticed but deliberately did not include in this
PR to keep it focused and reviewable:
new_msg_historyis assigned in the function body but never returned.Leaving as-is for a separate PR.
PromptScaffoldabstraction would let domains customize how prior resultsare summarized; that's a larger framework-level change worth discussing on
the issue thread before implementing.
Test plan
tests/test_meta_agent.pycovering:repo_path(regression check)eval_pathappears in the instruction when providedeval_pathis omitted from the instruction when empty/falsyiterations_leftappears as a numeric budget hint when providediterations_left=None(default) produces no budget hintMetaAgent.forwardwith apopulated
eval_pathagainst a stubchat_with_agentand confirmedthe agent receives the expected three-section instruction.
Files changed
meta_agent.py— wire both parameters into the instruction; structure as alist of parts joined on blank lines so the conditional sections compose
cleanly.
tests/test_meta_agent.py— new file, 5 tests.