Skip to content

Stop smuggling per-call agent arguments through workflow state#46

Merged
czpython merged 1 commit into
mainfrom
commonzenpython/eng-725-build-stop-smuggling-per-call-agent-arguments-through
Jul 20, 2026
Merged

Stop smuggling per-call agent arguments through workflow state#46
czpython merged 1 commit into
mainfrom
commonzenpython/eng-725-build-stop-smuggling-per-call-agent-arguments-through

Conversation

@czpython

Copy link
Copy Markdown
Owner

Three fields on build's workflows were arguments to the next agent call dressed up as run state — set by mutating self so get_prompt_context / the workspace hooks could read them back:

  • _answered / _note carried the operator's gate reply into exactly one plan pass, then reset.
  • Profile._repo smuggled what input.repo_id already 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_plan passes answered_questions= / operator_note= as call kwargs; the instance fields, their context plumbing, and the BuildPromptContext fields are deleted. generate_plan.md reads the kwargs top-level (build.answered_questionsanswered_questions, build.operator_noteoperator_note).
  • Profile resolves ProjectRepo.get(self.input.repo_id).full_name in 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 their build. 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

@czpython
czpython merged commit 875bdde into main Jul 20, 2026
1 check failed
@czpython
czpython deleted the commonzenpython/eng-725-build-stop-smuggling-per-call-agent-arguments-through branch July 20, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant