Skip to content

Worker bridged implementer path (#431 follow-up) - #437

Closed
DanielKillenberger wants to merge 5 commits into
gmickel:mainfrom
DanielKillenberger:fn-245-worker-bridged-implementer-path-431
Closed

DanielKillenberger wants to merge 5 commits into
gmickel:mainfrom
DanielKillenberger:fn-245-worker-bridged-implementer-path-431

Conversation

@DanielKillenberger

Copy link
Copy Markdown

Worker bridged implementer path (#431 follow-up)

Step 3c of the work skill routes implementation to the implementer tier, but the only thing it ever spawns is the in-host worker subagent, and the worker's own phases never consult that tier. When a project's routing block pins the implementer to a model the harness reaches only through a CLI bridge, the two documents disagree by omission.

Spec: fn-245-worker-bridged-implementer-path-431
Branch: fn-245-worker-bridged-implementer-path-431main
Tasks: 1 completed
R-ID coverage: 7/7 evidenced

Follow-up to #436, which closed #431.

TL;DR

  • When the implementer tier is pinned to a model this harness reaches only by CLI, the in-host worker now runs the bridge itself; the conductor never bridges.
  • The worker anchors and records the base commit as today, skips its own investigation and any scout fan-out, and hands the child a pointer prompt plus the usage guide's timebox-free long-task brief; the worker's own TIMEBOX is never copied into that brief.
  • On return the worker commits anything the child left uncommitted, reviews the child's commit range, runs the gates on it, and continues with review dispatch and flowctl done exactly as before.
  • The minted-task subagent license narrows on this path: parallel bridge calls on disjoint surfaces, each child in its own isolated workspace and branch; research and scouting are the child's job.
  • The Codex mirror is regenerated, and its step 3c now carries the implementer-tier paragraph it had been dropping since Orchestration by intent: named tiers, reach pages, zero shipped slugs #352.

Not in this PR (by design)

  • No flowctl code, hook, guard, or config key; the path is prose, consistent with Bridged implementer may commit checkpoints; timebox-free brief for long bridged tasks (#431) #436.
  • The bridge safety rule and the long-task brief in the usage guide are not changed; the worker references them.
  • No change to the conductor's dispatch template fields, the parallel-wave and host-deferred contracts, the review backends, or flowctl done.
  • No change to the reach pages or the orchestration guide beyond what a reader needs to find the worker path.
  • No site (flow-next.dev) changes in this PR.

The change, top to bottom

When the implementer tier resolves to a model the harness reaches only by CLI bridge, the in-host worker now runs the bridge itself: it anchors and persists the base as today, skips its own investigation and any scout fan-out, hands the child a pointer prompt plus the usage guide's timebox-free brief, and on return reviews the child's commit range and runs the gates before review dispatch and flowctl done. The conductor never bridges, and the minted-task subagent license narrows on this path. Prose only; the Codex mirror is regenerated.

Proof Value Sources
Artifact fn-245-aid-4f354c9c-2 artifact identity
Base commit 07cfcf662d978796aa4b7b46e8bccec27109effe artifact currentness
Head commit 4f354c9cffed6d1e786c46102c974abf0fa4e1dd artifact identity
Human-review lines 49 deterministic file stats
Canonical files 5 deterministic membership
Total files 13 deterministic membership
Tasks 1/1 done source:t1
Acceptance 7/7 R-IDs evidenced source:s-spec, source:t1
Full gate run_tests_parallel.py green at the PR head (4991 ran, 0 failures); ruff 0.16.0 clean; sync-codex.sh idempotent (empty diff on the second run) source:t1, source:d
Review impl-review via codex: round 1 fan-out NEEDS_WORK (isolate concurrent children; commit the dirty remainder before inspection), round 2 SHIP source:t1
Net 13 files, +384/-3; 5 canonical, 3 generated mirror, 5 Flow state source:d
Change Attention File Purpose +/- Diff Evidence
MODIFIED CANONICAL plugins/flow-next/agents/worker.md New Bridged implementer section (gate, who does what, keep/skip, pointer prompt, run the bridge, on return); Phase 1.5 skip note; Investigate-first rule names the child. +19/-1 source:d
MODIFIED CANONICAL plugins/flow-next/skills/flow-next-work/phases.md One paragraph after the implementer-tier sentence: worker bridges, conductor never does, TIMEBOX is the worker's. +2/-0 source:d
MODIFIED CANONICAL scripts/sync-codex.sh SECTION3C heredoc gains the implementer-tier and bridge paragraphs; two grep guards added to the dispatch-field check. +7/-1 source:d
MODIFIED CANONICAL plugins/flow-next/skills/flow-next-work/references/no-plan-route.md Bridged implementer paragraph appended to Judicious subagent use. +18/-0 source:d
MODIFIED CANONICAL CHANGELOG.md Unreleased Changed entry referencing #431 and #436. +1/-0 source:d

Critical changes

How to review this PR

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

  • Tests / gates: python3 scripts/run_tests_parallel.py green at the PR head (4991 ran, 0 failures); uvx ruff@0.16.0 check . clean; scripts/sync-codex.sh idempotent (empty diff on the second run)
  • R-ID coverage: 7/7 acceptance criteria evidenced
  • Cross-model review: impl-review via codex, round 1 fan-out NEEDS_WORK (isolate concurrent children; commit the dirty remainder before inspection), round 2 SHIP

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

  • Line-review the Must review bucket below — the one canonical file that carries the new contract.
  • Spot-check the verified claims above; sample, don't re-run everything.
  • Own what machines can't judge: whether the worker/child split of judgment and investigation is the one you want, and whether the prose earns its always-loaded context cost (G1).

Review plan

Must review (~5%)

  • 🔴 plugins/flow-next/agents/worker.md — the only canonical file among the high-churn set; it is the new always-loaded worker contract — Does the section keep prompt composition, the diff check, the gates, review dispatch, and flowctl done with the worker while the child investigates, and does it forbid copying TIMEBOX into the child's brief? — open the ## Bridged implementer (gated on the implementer tier) section (also touched by c6a4872f)

Spot-check

Safe to skim (~85%)

  • ⚪ 3 files under plugins/flow-next/codex/ (agents/worker.toml, skills/flow-next-work/phases.md, skills/flow-next-work/references/no-plan-route.md) — regenerated by scripts/sync-codex.sh, guard-verified, idempotent on the second run — skim
  • ⚪ 5 files under .flow/ (the spec .md/.json, the task .md/.json, the bug memory entry) — task-state, not hand-written code — skim

Memory left behind

Bugs captured during this spec:

  • bug/integration/committing-bridged-children-cannot-2026-09-14 — The bridged-implementer prose in no-plan-route.md licensed "parallel bridge calls on disjoint surfaces, each with the same long-task brief" and then claimed "commit ownership and the join barrier stand unchanged".

Generated by /flow-next:make-pr from fn-245-worker-bridged-implementer-path-431 against main on 2026-09-14.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gretn9Fz79EuiZXQkwnr1s

DanielKillenberger and others added 5 commits September 14, 2026 10:22
…its implicit task

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gretn9Fz79EuiZXQkwnr1s
… is reached by CLI

- agents/worker.md gains a "Bridged implementer" section gated on the implementer tier resolving to a CLI-bridged model: keep Phase 0/1 and the persisted base, skip Phase 1.5 and scout fan-out, compose the pointer prompt plus the usage guide's long-task brief verbatim (never the worker's TIMEBOX), run the bridge foreground from the asserted repo root at the commit-permitting sandbox level, review <base>..HEAD on return, then Phase 3 onward as today
- work phases.md 3c: the worker runs the bridge itself, the conductor never bridges, TIMEBOX is the worker's cap and never the child's; the SECTION3C heredoc in sync-codex.sh now carries the implementer-tier paragraph and the bridge paragraph with grep guards
- no-plan-route.md judicious subagent license narrows on the bridged path: parallel bridge calls on disjoint surfaces; research and scouting fall to the child
- CHANGELOG Unreleased entry referencing gmickel#431 and gmickel#436; Codex mirror regenerated (idempotent on the second run)

Task: fn-245-worker-bridged-implementer-path-431.1

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gretn9Fz79EuiZXQkwnr1s
…d remainder before review

- no-plan-route.md bridged path: concurrent checkpointing children never share a checkout (one Git index); each gets its own workspace and branch, the worker integrates after all return; serial otherwise; commit ownership on the task branch reconciled
- worker.md On return: a dirty tree is committed first so <base>..HEAD holds everything the child produced before the worker's inspection
- CHANGELOG wording follows; Codex mirror regenerated (idempotent)

Task: fn-245-worker-bridged-implementer-path-431.1

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gretn9Fz79EuiZXQkwnr1s
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T08:57:35.930246Z 4f354c9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f354c9cff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


## Bridged implementer (gated on the implementer tier)

**Gate.** This section runs only when the **implementer** tier resolves to a model this harness reaches by shelling out to another CLI, per its reach page (`plugins/flow-next/docs/reach/`). Resolve the tier by the routing precedence, highest first: an explicit argument in the invocation, then the project routing block in the instruction file, then the agent definition's own default, then the session model. When the tier resolves to the session model or to an in-host subagent model, this section is inert: the standard phases run unchanged, Phase 1.5 included. When the named model is unreachable from this harness, the reach page's degradation applies: fall back to the session model, say so once, and continue on the standard path.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Link the worker to the packaged reach page

When this agent runs from an installed plugin in a consumer repository—the normal deployment—plugins/flow-next/docs/reach/ does not exist in that checkout: canonical agent links must resolve through ../docs/reach/README.md, while the Codex mirror installs the page beneath ../docs/flow-next/reach/README.md. Because the fresh-context worker receives only configuration fields and this new gate depends on the reach page to distinguish an in-host model from a CLI-only or unreachable one, it can silently select the wrong implementation path. Make this a relative Markdown link so sync-codex.sh rewrites and validates the installed layout.

AGENTS.md reference: AGENTS.md:L7-L8

Useful? React with 👍 / 👎.

@gmickel

gmickel commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Closing in favour of #438, which shipped in 5.4.0 (https://github.com/gmickel/flow-next/releases/tag/flow-next-v5.4.0).

Your diagnosis was right and is adopted: step 3c routed implementation to the implementer tier but the worker never consulted it, so a pinned bridge model was silently ignored. #438 takes that fix (worker Phase 1b: pointer prompt plus the usage guide's brief, one foreground bridge call, dirty-tree commit, base..HEAD review, gates, then the normal review and done) and the 3c paragraph, with the mirror's implementer-tier paragraph restored.

Where it differs from this PR: fan-out stays with the bridged child rather than moving to the worker as parallel bridge calls in per-child worktrees. The direct route's premise is one owner with the whole task and its own delegation, so on the bridged path the owner is the child; the brief's never-list is back to five clauses (push, history rewrite, scope, verdict, nested bridge), and the July keep-the-child-flat caveat is now a dated watch after openai/codex#33267's own repro ran clean on codex-cli 0.153.4. The reasoning is recorded in STRATEGY.md (The owner holds the license) and criteria.md G3.

Thanks for the work here; the changelog credits the diagnosis.

@gmickel gmickel closed this Sep 14, 2026
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