Stop smuggling per-call agent arguments through workflow state#46
Merged
czpython merged 1 commit intoJul 20, 2026
Conversation
czpython
deleted the
commonzenpython/eng-725-build-stop-smuggling-per-call-agent-arguments-through
branch
July 20, 2026 15:20
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.
Three fields on build's workflows were arguments to the next agent call dressed up as run state — set by mutating
selfsoget_prompt_context/ the workspace hooks could read them back:_answered/_notecarried the operator's gate reply into exactly one plan pass, then reset.Profile._reposmuggled whatinput.repo_idalready determines.Agent calls already have the right channel: call kwargs merge into the template namespace at top level (the
repo_profiler(repo=...)precedent). So:generate_planpassesanswered_questions=/operator_note=as call kwargs; the instance fields, their context plumbing, and theBuildPromptContextfields are deleted.generate_plan.mdreads the kwargs top-level (build.answered_questions→answered_questions,build.operator_note→operator_note).ProfileresolvesProjectRepo.get(self.input.repo_id).full_namein each hook instead of stashing it on the instance.Behavior identical; prompts render the same context. One note for repo-level prompt overrides of
generate_plan.md: the two names lost theirbuild.prefix, and StrictUndefined fails loudly on a stale override rather than rendering empty prose.Lands before the BuildJournal (ENG-726) so the journal doesn't inherit the smuggle fields.
ENG-725