Skip to content

Explicit area continuation across harnesses

The zdev area loop works through approved tasks one task and one verified commit at a time, continuing while the area is open, work is ready, and the checkout is safe. Codex, Claude Code, and Oh My Pi support native continuation; OpenCode and Pi stop after one task.

Inside a T3 Code main thread running Codex or Claude Code, T3 orchestration is the default and uses completion-driven continuation unless you explicitly ask for native orchestration. The main thread dispatches each phase as a T3 child task and reports the selected task, each phase result, and each commit. Child completion wakes the coordinator, which selects fresh work after a verified commit and dispatches the next worker before yielding. This path uses T3’s visible parent /goal (backed by the coordinator provider) instead of Claude’s JavaScript loop, and both goal turns and child wakes reconcile the same pending worker before dispatch. The task and stop rules below still apply; the per-harness native adapters govern runs outside T3 Code and explicit native requests.

Serial research in Codex and Claude Code uses a separate research route, where an explicit run authorization permits scoped task generation after queue exhaustion under durable run accounting. The ordinary area loop described here stops when the queue is exhausted and guards hypotheses.

The canonical route is zdev-loop, and zdev-goal is an exact alias:

zdev-loop <area> [focus...]
zdev-goal <area> [focus...]

Both mean the same thing: continue the named area one approved task at a time while it is open, ready, and safe, using the same stop states and canonical zdev-loop envelopes. zdev-goal is not a one-task mode and has no --native variant. Any text after the area acts as fuzzy selection guidance rather than an exact filter or stored setting.

When you give blanket approval for compatible parallel batches, the run uses the supported Parallel route across iterations. Each finite batch reads fresh ready tasks and rechecks compatibility, ownership, and capacity within the chosen area, work, worker, destination, worktree, and cleanup limits without asking again between batches. Anything outside that authority still requires a new decision, and approval for a single batch ends with that batch. Bounded harnesses keep their continuation limits.

Inside an active zdev context, natural-language requests like “goal the <area> area” and “loop the <area> area” invoke this continuing route. Zdev is active once you call a zdev entry point, refer to a specific .zdev area, or explicitly ask to use zdev; generic mentions of “goal” or “loop” outside that context never activate zdev.

When you pass only an area, each iteration calls zdev work-context <area>, whose nested goal picks the ready task ranked by AFK suitability, priority, and numeric ID. When you include focus text, the harness reads every full task in the ready frontier, picks the closest match, and admits it with zdev work-context <area> --task <task-id>, repeating that check from fresh evidence after each commit.

Each harness has one zdev skill. These requests select its continuation route:

Harness Activate Request
Codex $zdev “loop through <area>” or “set a goal for <area>”
Claude Code zdev “loop through <area>” or “set a goal for <area>”
OpenCode zdev “loop through <area>” or “set a goal for <area>”
Pi /skill:zdev-pi “loop through <area>” or “set a goal for <area>”
Oh My Pi zdev “loop through <area>” or “set a goal for <area>”

Harness-native workflows, commands, and prompts implement the selected route as adapters inside the installed integration rather than separate skills.

Asking to set a goal over all areas or several named areas takes a direct route instead. The skill runs zdev goal --all or zdev goal <area> <area>... and uses the rendered condition unchanged. Codex and Oh My Pi set it through their goal tools; Claude Code, OpenCode, and Pi have no model-callable goal tool, so the skill prints the condition in a code block for you to copy. Under that goal, each iteration selects a covered area and runs the one-task route there. See several areas for the rendered condition.

Claude routes both zdev-loop and zdev-goal to its packaged JavaScript workflow and does not inspect or apply Claude Code’s separate /goal. Codex and Oh My Pi preserve their native-goal conflict rules.

Across every harness, the task workflow checks for a validated closed area before status, Git, and task-work gates, while open work still requires task-work safety and full Git evidence.

Each iteration follows the implementation contract inside the installed zdev skill, which owns complexity routing, optional advanced planning, implementation, fresh independent verification, concrete REWORK, task completion, exact staging, and one zdev commit. Claude folds that one-task body into its loop artifact at install time instead of importing or calling another workflow at runtime.

Before each iteration, the coordinator makes a fresh selection (area-only or fuzzy-focus) and stores its work-context, validating lifecycle, records, dependencies, selected task, branch safety, HEAD, and exact Git evidence. A validated closed context returns no work before branch or Git collection; an open empty or exhausted context stays fully gated. A stale_advisory is reported once and does not block work.

A successful iteration returns PASS zdev-implement <area> <task-id> with a commit ID starting with the full 40-character SHA. The outer workflow records that pair and fetches fresh work-context before deciding whether to continue. Any one-task blocker, malformed result, missing commit ID, or user-owned decision stops the run immediately. The loop never combines two tasks into one verification or commit, and never selects the next task from pre-commit state.

Codex and Oh My Pi use native_goal from zdev goal <area> --format json unchanged, adding --focus <text> for user guidance and --parallel for an authorized parallel run. The CLI owns the condition while task context and run progress stay in the conversation; Claude’s packaged workflow encodes the same stop predicate directly.

Parallel continuation defaults to four independent task slots and worktrees. Each slot can advance without waiting on its peers, while destination integration, verification, and commits stay serial. Adapters limited to finite task lists finish the current list before admitting the next one.

A confirmed blocker stops the run in the same turn. The area condition asks the agent to report the reason and preserved state and then pause the goal, so Codex calls update_goal with status: "paused". Because that instruction lives inside the user’s goal, Codex treats it as a user-requested pause and avoids its three-turn threshold for marking an unfinished goal blocked. Once the blocker is resolved, /goal resume continues the run. Oh My Pi has no model-callable pause operation, so it calls goal({ op: "complete" }), and Claude Code goals cannot be paused, so the report finishes the goal. In all cases the public result is BLOCKER, unfinished tasks and area lifecycle keep their exact state, and any different, paused, or budget-limited goal stays untouched. Actionable in-scope rework continues under the normal task contract.

A BLOCKER result ends with Resume goal: and a ready-to-send command in a code block: /goal resume when the goal is paused, or the exact condition as /goal <condition> (Codex, Claude Code, T3 Code) or /goal set <condition> (Oh My Pi). A CONTINUE that reports a lost goal continuation includes the full condition as well.

Fresh state or event Result
open / ready, safe Run exactly one task iteration. After PASS and commit, collect fresh work-context before deciding or dispatching again.
open / empty PASS; no worker. The area objective remains open.
open / blocked PASS; no worker. Every open task waits on another area; report each cross_area_waits entry. The area objective remains open.
open / exhausted PASS; no worker. The area objective remains open.
closed / empty or closed / exhausted PASS; no worker. Report the explicit closed lifecycle without branch status or advisory. Works off-branch, detached, or during an unrelated Git operation.
Unsafe task-work state or unexplained Git state BLOCKER; no worker. Preserve and report exact state.
Malformed records, missing blockers, or a dependency cycle Validation error surfaced as BLOCKER; no worker or mutation.
Implementer or verifier BLOCKER, or completion or commit failure BLOCKER; stop with the one-task workflow’s preserved state. Do not count the task or retry it as new work.
Concrete task-owned REWORK Use the shared correction pass and focused recheck. Stop with work preserved if required corrections remain; continuation does not reset the allowance.
Required user-owned product, scope, or unsafe-expansion decision BLOCKER; stop and ask for that decision.
Known unfinished native goal on Codex or Oh My Pi BLOCKER; do not replace, clear, edit, or layer the zdev loop over it.

Under native continuation on Codex, Claude Code, or Oh My Pi, a refreshed open/ready state starts the next iteration. On OpenCode and Pi, the first committed task returns CONTINUE with the refreshed next task and stops; a bounded invocation never claims that the loop is still running in the background.

The public first lines are:

PASS zdev-loop <area>
CONTINUE zdev-loop <area>
BLOCKER zdev-loop <area>

Every body lists Area, optional Focus, Lifecycle, and Queue, followed by the Advisory line once if any iteration saw a stale advisory, then Tasks completed, Commits, and Stop reason. Tasks and commits include only successful one-task pairs. Lifecycle or Queue is unknown if validation failed before reading them; Commits is none or a comma-separated list of full commit IDs. A direct closed result omits Advisory. CONTINUE adds Next task; BLOCKER adds Current task (none when no task was selected), Failed stage, Reason, and Preserved state. These are coordinator envelopes; the inner implement and verify envelopes are defined in Harness orchestration.

Harness Installed artifacts Continuation behavior
Codex One zdev/SKILL.md with references/area-loop.md. The root skill calls get_goal, creates the area condition with create_goal when clear, and falls back to one task with CONTINUE only if inspection succeeded and proved clear while creation is unavailable. Never uses interactive composer commands.
Claude Code Plugin workflows workflows/zdev-loop.js and workflows/zdev-goal.js, rendered from one canonical loop source with only meta.name differing. Both run the same standalone JavaScript loop and never read or use /goal. If dynamic workflows are disabled or unsupported, the shared zdev skill handles an active-context natural goal/loop request as one bounded task, returns CONTINUE, and notes that the named workflow command was unavailable.
OpenCode commands/zdev-loop.md and commands/zdev-goal.md, rendered from one command source. Both prompt commands complete at most one committed task and return CONTINUE when ready work remains. Session resume is a convenience rather than a continuation guarantee.
Pi prompts/zdev-loop.md and prompts/zdev-goal.md, rendered from one prompt source. Both prompt templates use the zdev skill and subagent extension, complete at most one committed task, and return CONTINUE.
Oh My Pi prompts/zdev-loop.md and prompts/zdev-goal.md, rendered from one prompt source. Both call the model-facing goal tool (get, create, and same-goal resume) and rely on the native runtime to continue, never calling interactive composer commands. If inspection proved clear but creation is unavailable, they run one task and return CONTINUE; unavailable inspection blocks.

The shared templates sit beside templates/zdev/task-workflows.md, and the harness adapters render the files above through the all-or-nothing installer. No harness gets a synthetic JavaScript runtime, session database, or scheduler.

The installed zdev-loop and zdev-goal workflows come from one canonical source with only meta.name changed. At install time, that source embeds the one-task implementation body so planning, complexity routing, verification, REWORK, completion, exact staging, and commit checks match zdev-implement without runtime imports or cross-workflow calls.

Each iteration runs four steps:

  1. Select from fresh evidence: call zdev work-context <area> when there is no focus, or read the full ready frontier and admit one explicit task when focus is present.
  2. Feed that result to the one-task workflow’s initial preflight. A valid no-work result exits cleanly without launching a worker.
  3. On an exact task PASS with a commit ID, record the task and commit. Any planner, implementer, verifier, completion, commit, malformed-result, or user-decision blocker stops immediately without selecting another task.
  4. Collect fresh work-context before starting another iteration. The next task is never chosen from pre-commit context.

Claude may cache a completed agent result across a workflow resume, which does not by itself authorize continuation: whether the completion PASS was live or cached, the outer workflow still collects fresh work-context next, and the ordinary completion step refreshes and compares task identity, safety, HEAD, index, worktree, and untracked evidence before mutating anything. The loop adds no reconciliation worker, approval manifest, replay ledger, or second completion protocol.

Both zdev-loop and zdev-goal emit PASS zdev-loop <area> or BLOCKER zdev-loop <area> with the latest lifecycle and queue, a single stale advisory if observed, completed task IDs, commit IDs, and stop reason. Neither workflow reads, invokes, or depends on Claude’s separate /goal.

On Codex and Oh My Pi, an active, paused, budget-limited, or otherwise unfinished native goal takes precedence. Starting either alias reports the conflict and stops without falling back to a plain prompt that would layer work on top of the existing goal. Resuming the same zdev native goal in its own session continues it rather than replacing it.

Claude’s zdev workflows are a separate native workflow mechanism that neither reads nor modifies /goal. The workflow runtime owns pause and same-session resume; because repository changes outlive cached workflow results, every live or cached task PASS is followed by fresh work-context before selecting another task, and the ordinary completion step keeps its own pre-mutation checks.

Zdev writes no loop execution log. A restarted invocation simply runs work-context again, using completed task records and commits as the durable checkpoint: fresh ready work starts the next task, an empty, exhausted, or closed state stops cleanly, and partial or unexplained working-tree state blocks under the normal recovery rules.

Focus is not persisted either. Each restart uses only the focus given to that invocation and never inherits selection guidance from an earlier run or task.

Harness Continuation and installed-command surfaces
Codex /goal creates one session goal and supports show, edit, pause, resume, and clear. Skills have explicit $name invocation, and agents/openai.yaml can disable implicit invocation. See Developer commands and skills.
Claude Code Dynamic JavaScript workflows own loops and intermediate values, resume within the same session, and are distributed under a plugin namespace. The workflow runtime provides agent() and pipeline() without module loading, direct shell access, or an API for the separate user-facing /goal command. See Workflows, goals, and plugin paths.
OpenCode Markdown files under commands/ become slash commands. Sessions can continue or resume without a native goal lifecycle. See Commands, TUI sessions, and CLI sessions.
Pi Markdown prompt templates become /name prompts. Sessions are persisted and resumable without a native goal lifecycle. See Prompt templates, skills, and sessions.
Oh My Pi The goal runtime refuses to overwrite unfinished goals and supports pause, resume, drop, completion, and continuation. Prompt templates become slash commands. See Goal runtime, continuation prompt, and prompt loader.

In short, Codex and Oh My Pi continue through their native goal runtimes, Claude Code uses a plugin JavaScript workflow independent of /goal, and OpenCode and Pi share the same command surface while stopping after one committed task.

The loop contract introduces no scheduler, daemon, process manager, cross-harness session store, duplicate queue, automatic branch switching, rebasing, or coordinator model selection. Round-trip, derived-work, and trunk-area rules stay in their own records under the same one-task verification and commit boundary.