Repository navigation
feat(server): t3_workflow_run takes templates and shows grown agents as they are added - #20
Merged
Merged
Conversation
…as they are added
t3_workflow_run checks every template's target before it starts, and its description
names templates, dry, addAgents, rerun and {{input.x}} (+115 B of tool list). A service
test grows a run to 20 agents: the 17 grown rows show queued under their phase and round
before round 2 starts, and every row update stays within 2 KB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t can name its stage The description advertised dry? without its meaning and left out addAgents' stage?. It now says dry:N ends the loop after N rounds that add no agents and ask for no rerun, within the same tool-list budget (47,106 B, +1 B over the previous text). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # apps/server/src/mcp/WorkflowRuns.test.ts # apps/server/src/mcp/WorkflowRuns.ts
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.
Size: S. 10+/2− hand-written, plus 93 lines of tests. Stacked on #19 (
wf/10-grow-within); merge that first, then retarget this PR towf/integration.Problem
#19 lets a
repeatgrow within one run from its judge's result. Etan, verbatim: "In an inner loop workflow, the workflow grows within. It doesn't need to go out and get to the one who created it." and "the growth within is deterministic upon what the judge ... decides". For agents to use this, two things were still missing:t3_workflow_rundidn't tell them about it.Design
WorkflowRuns.runchecks every template's target before anything starts, the same way it checks spec agents. That includes refusingenvironmentId.dry?,templates?:{name:{task}}, the judge'saddAgents:[{key, template, input}]andrerun:[stage], and{{input.x}}.queuedrow with the rightphaseIndex(its stage) andattempt(its round). wf/9-ui-parity draws every phase up front and adds per-agent model and timings; this PR leaves that to wf/9 and only supplies the rows.Tests
One service test drives the real orchestrator:
shows a judge's grown agents queued under their phase and round, within 2 KB per update.rerun: ["critique"], so the run grows to 20 agents.probe-17) appears, the row's round-2 agents are exactly those 17, allqueued, phasedraft, attempt 2, and nothing from round 2 has started yet.{{input.angle}}filled in.exit: "accepted", and every row update stays within 2 KB.I wrote this test before the per-update split in #19. Recording all 17 added agents in one update measured 2,439 B, over the cap. That measurement is why #19 records them one per update.
Bytes
AgentContextBudget.test.tsdry:NandaddAgents.stage?). The stack total is +1,199 B over upstream 45,907.AgentContextBudget.test.tskeeps every workflow row update within 2 KB…(20 static agents)Not run
The paid
mcp-tool-useevals: this worktree has no eval API keys.evals/mcp-tool-use/run.test.ts, which tests the grader and its decoding of real specs, passes 411/411.I didn't add an eval case for growth: the case rule says a new case must be shown to fail on the old text first, and I couldn't run one.
Demo
inner-loop-grow-demo.jsonin the plan folder is a Haiku haiku inner loop:critic,redteamandrewritertemplates;dry: 2,max: 4.node wf10/decode-demo.mjsdecodes it with the real decoder, then drives the real runner with scripted critic results:Gate
gate.sh wf/10-grow-within: green. Lint 3 files, 0 diagnostics; fmt clean;apps/servertypecheck;WorkflowRuns.test.ts9/9.gate.sh fork/wf/integrationon the stack: green. 6 files linted;apps/serverandpackages/contractstypecheck; 31/31 tests.AgentContextBudget,McpHttpServerandOrchestratorMcpToolkit.integration: 30/30.Merged the updated #19 (with #18) in (
420c7562c5)WorkflowRuns.run. fix(server): server-run workflows list every phase up front with each agent's model and time #18's loop plans each spec agent's target, and this PR's loop checked template targets. Both now run in one loop: templates are checked up front but not planned, because a grown agent's key is only known once the judge picks it.WorkflowRuns.test.ts. I took feat(server): a workflow repeat grows within one run from its judge's result #19's version and re-inserted this PR's grow-to-20 test as one block (wf10/restack-test.mjs). Its assertions now follow fix(server): server-run workflows list every phase up front with each agent's model and time #18's layout. At the momentprobe-17is recorded, the phases aredraft · round 1,critique · round 1,draft · round 2andcritique · round 2. The round-2 rows are the 17 probes plus the planned critic, all queued with no child thread;rerun: ["critique"]leaves the poet out.gate.sh fork/wf/integrationis green: 6 files linted, 41/41 tests. Budget, HTTP-server, toolkit, workflow-rows, eval-grader and client-runtime suites pass 460/460.Implementer: Claude Opus 5.5. Review rounds: 1. Codex approved #20. Its tool-text SHOULD (
dry?had no meaning;addAgents.stage?was missing) is fixed in0d53251e2a, at +1 B.🤖 Generated with Claude Opus 5.5 in T3 Code Nightly