Skip to content

Bridged child owns the task: worker bridge path, license and caveats - #438

Merged
gmickel merged 6 commits into
mainfrom
fn-245-bridge-child-owns-the-task-worker
Sep 14, 2026
Merged

gmickel merged 6 commits into
mainfrom
fn-245-bridge-child-owns-the-task-worker

Conversation

@gmickel

@gmickel gmickel commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Bridge child owns the task: worker bridge path, fan-out license restored, July codex caveats retired

The direct route rests on one owner seeing the whole task and deciding its own delegation. When a routing block pins the implementer to a model reached over a CLI bridge, the worker never consulted that tier, and the #436 long-task brief forbade the child from spawning any agent, a clause no requirement asked for.

Spec: fn-245-bridge-child-owns-the-task-worker
Branch: fn-245-bridge-child-owns-the-task-workerorigin/main
Tasks: 1 completed
R-ID coverage: 11/11 evidenced

Follow-up to #436 (closed #431). Adopts the diagnosis of #437 without its shape; see Decisions.

TL;DR

  • The worker gains a thin Phase 1b: when the implementer tier resolves to a CLI-reached model, it hands the task to the bridged child with a pointer prompt plus the usage guide's brief, runs one foreground bridge call, and on return commits any remainder, reviews the child's commit range, and runs the gates. The conductor never bridges.
  • The long-task brief bans only a nested bridge again and carries the judicious-subagent license, so the bridged child holds the same delegation license as an in-host worker. "Never spawn another agent" is retired.
  • The July codex caveats become dated watches with the measured evidence: codex exec: multi_agent_v2 subagent results unusable — parent turn fails with "Encrypted function output content could not be decrypted or decoded" openai/codex#33267 still open upstream for 0.144 to 0.145, its minimal repro clean on 0.153.4, zero decode errors across the September spawning runs. fn-98's undone R2 (steering works on both paths since 0.146.0) is delivered here and fn-98 is closed.
  • STRATEGY.md gains "The owner holds the license" and criteria.md gains G3, so the next accidental narrowing of an owner's license is a review finding.
  • The worker's done summary records which model implemented and how many subagents the child dispatched.

Not in this PR (by design)

  • No worker-side parallel bridge calls, per-child worktrees, or branch integration in the worker; delegation belongs to the child.
  • The never clauses other than the bridge one are unchanged: never push, never rebase or rewrite history, never decide scope, never issue a verdict.
  • fn-98's R5 to R9 (the Codex read-only guarantee) stay out of scope.
  • No new eval ships in this spec; the owner-serial versus owner-delegating study is a follow-up under agent-evals.
  • Closing PR Worker bridged implementer path (#431 follow-up) #437 and replying on Bridged implementer may not commit, which turns one-task specs into many host-driven turns #431 are external communications that wait for the maintainer's go.
  • The frozen guidance-eval baseline arm is not edited.

The change, top to bottom

When the implementer tier is reached over a CLI bridge, the bridged child now owns the task and its own delegation: the worker gains a thin Phase 1b that hands the task over and reviews the child's commit range, the long-task brief bans only a nested bridge and carries the fan-out license, the July codex caveats become dated watches with the measured evidence (folding in fn-98's undone R2), and a strategy principle plus standing criterion G3 make the next accidental narrowing a review finding.

Proof Value Sources
Artifact fn-245-aid-3934991a artifact identity
Base commit 07cfcf662d978796aa4b7b46e8bccec27109effe artifact currentness
Head commit 3934991aae7b29256a06381ce9041cfb6c4173b9 artifact identity
Human-review lines 94 deterministic file stats
Canonical files 10 deterministic membership
Total files 24 deterministic membership
Full gate python3 scripts/run_tests_parallel.py green, 4991 ran; ruff 0.16.0 clean; sync-codex.sh idempotent source:s-t1
Review codex impl-review: round 1 three-draw NEEDS_WORK, 3 findings fixed in f5d0a87 and 79bc5ad; round 2 SHIP source:s-t1, source:s-c2, source:s-c3
Upstream watch evidence openai/codex#33267 repro clean 3/3 on codex-cli 0.153.4; zero decode errors across 17 exec spawning runs and 23 spawning child threads source:s-spec
R-ID coverage R1-R9 and R11 satisfied in the three commits; R10's site half deferred to the release walk source:s-c1, source:s-t1

Legend: WHY PRINCIPLE STEP KEPT VERIFY · NEW MODIFIED DELETED RENAMED COPIED · CANONICAL GENERATED MECHANICAL

WHY 0. Two defects and a policy gap — The worker never consults the implementer tier, so a routing block pinning a CLI-reached model is silently ignored and the session model implements. The #436 long-task brief says never spawn another agent, a clause no requirement asked for; the worker generalized the July keep-the-child-flat caveats into a never-list and three checks missed it. Nothing stated whether fan-out on the bridged path belongs to the wrapper or the child, and the direct route's premise is one owner with the whole task and its own delegation.

Evidence: source:s-spec

PRINCIPLE 1. The owner holds the license — Whoever implements owns delegation: the in-host worker on the standard path, the bridged child over a CLI bridge. Wrappers, scouts, and conductors never fan out on the implementer's behalf. Safety rules bound push, history rewrite, scope, verdict, and nested bridges, never the owner's own delegation. Recorded as a strategy design principle and as standing criterion G3, which completion review judges on every spec.

Evidence: source:s-t1, source:s-c1, source:s-r7, source:s-r8, R-ID:R7, R-ID:R8, task:fn-245-bridge-child-owns-the-task-worker.1

Change Attention File Purpose +/- Diff Evidence
MODIFIED CANONICAL STRATEGY.md Fifth design principle with anchors to #436 and the September owner screens. +1/-0 source:s-diff
MODIFIED CANONICAL .flow/criteria.md G3: brief and license changes keep the owner's delegation; never-lists diffed clause by clause. +1/-0 source:s-diff
STEP 2. Worker Phase 1b: hand the task to the bridged child — A new worker phase resolves the implementer tier (an optional IMPLEMENTER dispatch line, then the routing block, then defaults) and, when the model is reached only by CLI, skips Phase 1.5 and every worker-side scout, composes a pointer prompt of identities and rails plus the usage guide's brief and the license verbatim, runs one foreground bridge call at the commit-permitting sandbox, then on return commits any dirty remainder, records the implement stage line with the model from the command line and the child's delegation count, reviews base..HEAD against the acceptance criteria, runs the focused gates, and continues at Phase 3. Step 3c states the worker bridges and the conductor never does; the mirror generator carries the same text.

Evidence: source:s-t1, source:s-c1, source:s-c2, source:s-r1, source:s-r2, source:s-r6, R-ID:R1, R-ID:R2, R-ID:R6, task:fn-245-bridge-child-owns-the-task-worker.1

Change Attention File Purpose +/- Diff Evidence
MODIFIED CANONICAL plugins/flow-next/agents/worker.md IMPLEMENTER dispatch field, Phase 1b, implement stage line, owner-holds-the-license check. +35/-1 source:s-diff
MODIFIED CANONICAL plugins/flow-next/skills/flow-next-work/phases.md 3c: worker bridges, conductor never does; optional IMPLEMENTER line in the dispatch template. +5/-0 source:s-diff
MODIFIED CANONICAL scripts/sync-codex.sh SECTION3C heredoc carries the implementer-tier and bridge paragraphs with grep guards. +11/-1 source:s-diff
STEP 3. Brief and license: the child keeps its fan-out — The long-task brief's never clause reads never spawn another bridge, and the brief carries the judicious-subagent license so a bridged child holds the same delegation license as the in-host worker; its digest reports the number of subagents dispatched. The no-plan route's license names the owner as its holder wherever the owner runs and defers the commit convention to the owner's path, which a review finding showed was contradicting the brief's checkpoint convention.

Evidence: source:s-t1, source:s-c1, source:s-c2, source:s-r3, R-ID:R3, task:fn-245-bridge-child-owns-the-task-worker.1

Change Attention File Purpose +/- Diff Evidence
MODIFIED CANONICAL plugins/flow-next/templates/usage.md Brief clause reverted to nested-bridge only; license sentences added; self-bridge line becomes a dated watch. +10/-4 source:s-diff
MODIFIED CANONICAL plugins/flow-next/skills/flow-next-work/references/no-plan-route.md License names the owner as holder; commit convention follows the owner's path. +10/-3 source:s-diff
STEP 4. July codex caveats retired into dated watches, fn-98 R2 folded in — The codex reach page's in-host row states fn-98's measured facts (steering works on both paths since 0.146.0, the precedence rule, the two dispatch gotchas) and its shell-out row drops the flat-child condition for a dated watch on openai/codex#33267 with the version scope and the clean repro. The platforms note and the usage guide's self-bridge line drop the July wording. fn-98 is closed with a pointer; its R4 and R5 to R9 are recorded as undone there. The usage guide's watch line omits the model identifier because a standing guard test forbids slugs in that region; the identifier lives on the reach page.

Evidence: source:s-t1, source:s-c1, source:s-c3, source:s-r4, source:s-r5, R-ID:R4, R-ID:R5, task:fn-245-bridge-child-owns-the-task-worker.1

Change Attention File Purpose +/- Diff Evidence
MODIFIED CANONICAL plugins/flow-next/docs/reach/codex.md In-host row: steering works; shell-out row: watch on #33267; missing-lever and fallback rows updated. +4/-4 source:s-diff
MODIFIED CANONICAL plugins/flow-next/docs/platforms.md July note replaced by fn-98's measured precedence. +1/-1 source:s-diff
Generated/mechanical files (2)
Change Attention File Purpose +/- Diff Evidence
MODIFIED MECHANICAL .flow/specs/fn-98-re-check-codex-mav2-subagent-model.md Close addendum pointing here; R4 and R5-R9 recorded undone. +6/-0 source:s-diff
MODIFIED MECHANICAL .flow/specs/fn-98-re-check-codex-mav2-subagent-model.json fn-98 status done. +2/-2 source:s-diff
STEP 5. Changelog and memory — An Unreleased entry names the worker path, the license restoration, the retired caveats, and the fn-98 fold, referencing #431, #436, and #437's diagnosis. Two bug memory entries record the #436 widening (symptom, the three checks that missed it, the July-caveat root cause, the clause-by-clause prevention rule) and the review-round finding that a forwarded license carried the wrong holder's commit contract.

Evidence: source:s-t1, source:s-c1, source:s-c3, source:s-r9, source:s-r10, R-ID:R9, R-ID:R10, task:fn-245-bridge-child-owns-the-task-worker.1

Change Attention File Purpose +/- Diff Evidence
MODIFIED CANONICAL CHANGELOG.md Unreleased entry for fn-245. +2/-0 source:s-diff
Generated/mechanical files (2)
Change Attention File Purpose +/- Diff Evidence
NEW MECHANICAL .flow/memory/bug/build-errors/implementer-brief-widened-never-list-2026-09-14.md The #436 widening and its prevention rule. +25/-0 source:s-diff
NEW MECHANICAL .flow/memory/bug/integration/forwarded-license-carried-the-wrong-2026-09-14.md Review-round finding on the forwarded license's commit contract. +25/-0 source:s-diff
KEPT 6. What did not change — No hook, flowctl code, or config key. No reach page other than codex changes, so Cursor, Droid, Grok Build, and Claude Code carry no new restriction. The other never clauses stand. No worker-side parallel bridge calls or worktree integration. fn-98's R5 to R9 stay out of scope. The site's work page, model-routing guide, cookbook entry, and landing card are the release walk's. Closing PR #437 and replying on #431 wait for the maintainer.

Evidence: source:s-spec, source:s-r11, R-ID:R11

VERIFY 7. Gate, mirror regeneration, and task state — Full parallel suite green (4991 ran), ruff clean, sync-codex.sh run twice with a clean second diff. The Codex mirror files are regenerated output; the .flow files are the spec, the minted implicit-owner task, and its receipt.

Evidence: source:s-t1, task:fn-245-bridge-child-owns-the-task-worker.1

Generated/mechanical files (10)
Change Attention File Purpose +/- Diff Evidence
MODIFIED GENERATED plugins/flow-next/codex/agents/worker.toml Regenerated by sync-codex.sh. +35/-1 source:s-diff
MODIFIED GENERATED plugins/flow-next/codex/docs/flow-next/platforms.md Regenerated by sync-codex.sh. +1/-1 source:s-diff
MODIFIED GENERATED plugins/flow-next/codex/docs/flow-next/reach/codex.md Regenerated by sync-codex.sh. +4/-4 source:s-diff
MODIFIED GENERATED plugins/flow-next/codex/skills/flow-next-work/phases.md Regenerated by sync-codex.sh. +7/-0 source:s-diff
MODIFIED GENERATED plugins/flow-next/codex/skills/flow-next-work/references/no-plan-route.md Regenerated by sync-codex.sh. +10/-3 source:s-diff
MODIFIED GENERATED plugins/flow-next/codex/templates/usage.md Regenerated by sync-codex.sh. +10/-4 source:s-diff
COPIED MECHANICAL .flow/specs/fn-245-bridge-child-owns-the-task-worker.json Spec sidecar. +45/-43 source:s-diff
NEW MECHANICAL .flow/specs/fn-245-bridge-child-owns-the-task-worker.md Captured spec body. +95/-0 source:s-diff
NEW MECHANICAL .flow/tasks/fn-245-bridge-child-owns-the-task-worker.1.json Task sidecar. +15/-0 source:s-diff
NEW MECHANICAL .flow/tasks/fn-245-bridge-child-owns-the-task-worker.1.md Task file with done summary and evidence. +24/-0 source:s-diff

Critical changes

How to review this PR

The pipeline already verified this — you don't re-check it from scratch:

  • Tests / gates: full parallel suite green (4991 ran), ruff 0.16.0 clean, sync-codex.sh idempotent; six prose-contract suites green per the task evidence.
  • R-ID coverage: 11/11 acceptance criteria evidenced (R10's site half is the release walk's, named in the task summary).
  • Cross-model review: codex impl-review, round 1 three-draw NEEDS_WORK with three findings fixed, round 2 SHIP, per the task receipt.

Your job — the calls the pipeline can't make:

  • Line-review the Must review bucket below — the ~20% that carries real judgment risk.
  • Own the policy: is "the owner holds the license" the principle you want in STRATEGY.md, and is G3's clause-by-clause never-list rule the right instrument?
  • Judge whether Phase 1b earns its always-loaded cost (G1) and whether the optional IMPLEMENTER dispatch line the review round added is a field you want.

Review plan

Must review (~20%)

  • 🔴 plugins/flow-next/agents/worker.md — highest-churn canonical file and the always-loaded worker contract — Does Phase 1b keep judgment with the worker (range review, gates, review dispatch, done) while leaving investigation and delegation entirely to the child, with no worker-side scouting or parallel bridges anywhere? — open "Phase 1b: Bridged implementer" (also touched by f5d0a877).
  • 🔴 plugins/flow-next/templates/usage.md — the brief inherited by every bridged child — Is the never-list exactly push, history, scope, verdict, nested bridge, and does the license sentence read as the same license the in-host worker holds? — open the Branch: <branch>, already checked out block and the paragraph below it (watch line adjusted in 79bc5ad9).
  • 🔴 STRATEGY.md / .flow/criteria.md — standing policy read on every capture and completion review — Would this principle and G3 have caught the Bridged implementer may commit checkpoints; timebox-free brief for long bridged tasks (#431) #436 widening at review time? — open the fifth design principle and G3.

Spot-check

Safe to skim (~80%)

  • ⚪ 6 files under plugins/flow-next/codex/ — regenerated by sync-codex.sh, idempotent on the second run — skim.
  • ⚪ 9 files under .flow/ — the spec, the minted implicit-owner task and receipt, fn-98's close addendum, and two bug memory entries; task-state, not hand-written code — skim.

Decisions made

No decision-track memory entries were written for this spec. The rationale lives in the spec's Decision Context: PR #437's diagnosis is adopted (the worker never consulted the tier) but its shape is not, because it moved fan-out to the Claude worker as parallel bridge calls with per-child worktrees, inherited the agent-spawn ban, and added integration machinery to an always-loaded prompt. The caveats become watches rather than deletions because the upstream issue is still open for older builds.

Memory left behind

Bugs captured during this spec:

Open items

  • R10's site half: the flow-next.dev work page, model-routing guide (including its Codex steering caveat), cookbook entry, and landing card belong to the downstream release walk, together with the Bridged implementer may commit checkpoints; timebox-free brief for long bridged tasks (#431) #436 wording they still carry.
  • Parked: whether a bridged child fans out on a real-sized task and whether that beats a serial owner. The probe task was too small to discriminate; resolves through an agent-evals study, not this PR.
  • The usage guide's watch line omits the model identifier because the fn-195 guard test forbids slugs in that region; the identifier lives on the codex reach page.

Generated by /flow-next:make-pr from fn-245-bridge-child-owns-the-task-worker against origin/main on 2026-09-14.

https://claude.ai/code/session_01JFYv5JtK8HAsshpWRAT5YL

…July codex caveats retired

- worker.md Phase 1b: implementer tier resolved before Phase 1.5; a CLI-reached
  model hands the task to the bridged child via pointer prompt + usage brief,
  one foreground bridge call, dirty-remainder commit, base..HEAD range review,
  focused gates, then Phase 3; `stage: implement` line records model + delegated count
- work phases.md 3c and the SECTION3C mirror heredoc: the worker bridges and the
  conductor never does; mirror 3c carries the implementer-tier paragraph again,
  with grep guards for both literals
- usage.md long-task brief: "never spawn another bridge"; carries the
  judicious-subagent license and asks for the delegation count in the digest;
  no-plan-route.md names the owner as the holder wherever it runs
- July "keep the child flat" caveats (usage.md self-bridge line, codex reach
  page shell-out row) are dated watch lines naming openai/codex#33267 with the
  0.153.4 / gpt-6-astra measurements and the 0.144-0.145 reported range
- fn-98 R2 folded in: codex reach page in-host row and platforms.md worker-pin
  note state the measured steering facts; fn-98 closed with a pointer, R4-R9
  recorded as undone
- STRATEGY.md "The owner holds the license"; .flow/criteria.md G3; bug memory
  entry for the #436 widening; CHANGELOG Unreleased entry
- Codex mirror regenerated (sync-codex.sh twice, clean second run)

Task: fn-245-bridge-child-owns-the-task-worker.1

Claude-Session: https://claude.ai/code/session_01JFYv5JtK8HAsshpWRAT5YL
…orwarded license and the stage-line model source

- work 3c dispatch (canonical + SECTION3C mirror heredoc) gains the optional
  IMPLEMENTER line; worker Phase 1b consults it as the highest routing rung
- no-plan-route.md license names the owner as the only committer and defers
  the commit convention to the owner's path, so the forwarded paragraph agrees
  with the long-task brief's checkpoint convention
- Phase 1b records `model:` from the bridge command line (never the child's
  self-report) and `delegated:` from the digest
- Codex mirror regenerated (sync-codex.sh twice, clean second run)

Review round 1 (codex, three draws): three merged findings, all addressed.

Task: fn-245-bridge-child-owns-the-task-worker.1

Claude-Session: https://claude.ai/code/session_01JFYv5JtK8HAsshpWRAT5YL
…eview-round memory entry

- usage.md names the codex-cli versions, counts, date and issue; the model
  identifier stays on the codex reach page (fn-195 R2 guard)
- bug memory entry for the fn-245 review round (forwarded license carried the
  wrong holder's commit contract)
- Codex mirror regenerated (sync-codex.sh twice, clean second run)

Task: fn-245-bridge-child-owns-the-task-worker.1

Claude-Session: https://claude.ai/code/session_01JFYv5JtK8HAsshpWRAT5YL
Copilot AI lite review requested due to automatic review settings September 14, 2026 10:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes always-loaded worker orchestration and implementer briefs that govern bridged delegation; mistakes could silently block fan-out or mis-route tiers, but there is no runtime code path—only prompt/docs with grep-guarded Codex mirrors.

Overview
When the implementer tier resolves to a model reachable only via CLI bridge, the worker now runs Phase 1b: it resolves routing (optional IMPLEMENTER dispatch line, then project routing), skips worker-side investigation/scouting, sends a pointer prompt plus the usage guide long-task brief and judicious-subagent license in one foreground bridge call, then commits any remainder, range-reviews base..HEAD, gates, and continues through review/done. The conductor only passes IMPLEMENTER when asked—it never bridges or fans out on the implementer's behalf. Done summaries add stage: implement with command-line model and the child's delegated: count.

The long-task brief narrows the #436 never-list from "never spawn another agent or bridge" to "never spawn another bridge" and embeds the fan-out license so the bridged child matches an in-host worker. no-plan-route.md names the owner as committer and defers commit convention to the owner's path (checkpoint vs single-commit).

Codex guidance is updated: spawn_agent steering is documented as working since 0.146.0 (fn-98 R2); July "flat child" / unreliable-steering caveats become dated watches on openai/codex#33267 with measured clean runs on 0.153.4. STRATEGY.md adds The owner holds the license; .flow/criteria.md adds G3 (never-lists diffed clause-by-clause; owner named explicitly). Work skill 3c, conduct checklist, CHANGELOG, spec/task artifacts, and sync-codex.sh SECTION3C guards mirror the same contracts.

Reviewed by Cursor Bugbot for commit 9d4a688. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread plugins/flow-next/agents/worker.md Outdated
Comment thread plugins/flow-next/agents/worker.md
Comment thread plugins/flow-next/skills/flow-next-work/phases.md
- Phase 1b: inert and unreachable branches end the phase explicitly; Done-when scoped to the bridged branch
- Investigate-first rule carries the Phase 1b bridged carve-out in sibling-rule shape
- Conduct checklist gains the bridged-implementer contract with its failure clause

Claude-Session: https://claude.ai/code/session_01JFYv5JtK8HAsshpWRAT5YL
@gmickel

gmickel commented Sep 14, 2026

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9d4a688. Configure here.

@gmickel
gmickel merged commit b0d5167 into main Sep 14, 2026
14 checks passed
@gmickel
gmickel deleted the fn-245-bridge-child-owns-the-task-worker branch September 14, 2026 12:07
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.

Bridged implementer may not commit, which turns one-task specs into many host-driven turns

2 participants