Repository navigation
Description
Ask
Test, on one real loop-zero feature, whether coordination can run as a single T3 Workflow run that keeps fine-grained state in the local T3 database and publishes to GitHub only the large units (feature issue, milestone comments, a small PR stack at the end). Then hold a decision discussion with the owner on whether "loop-zero next" is built this way.
Requested by the owner on 2026-11-25. Related: #552.
Start condition
Do not start until every T3 Code instance used in the run is on 0.1.12 or later (the release that adds Workflows, typed turn results and stack auto-merge). On 2026-11-25 the main host ran 0.1.11 with Workflows off. Upgrading is a separate host action and is not authorized by this issue.
Hypotheses
- A workflow run needs less supervision than a coordinator thread, because the run holds the state and no session has to survive, hand over or rebind.
- Building locally and publishing once costs fewer CI runs, queue entries and GitHub calls per feature.
- A meaningful share of
docs/DELEGATION.md(rollover, handoff, schedule rebinding, wait and wakeup rules) becomes code and could be deleted.
Constraints
- loop-zero's CLI, contract, skills and gates do not change during the experiment.
check,review,readyandmergestay the only delivery gates, and the review that gates each merge is a fresh formal review on the published head. - The workflow definition is a host file (
~/.t3/workflows/), not loop-zero core. Attach its final text to this issue. - The architecture guide's "no new scheduler or ledger" statement stays in force until the discussion decides otherwise. This experiment is the evidence for that decision, not a reversal of it.
- One host, one single-repository project. No multi-repository projects, no linked environments.
- Unpublished code is pushed to origin as a branch without a PR after each local step, so no work lives on one disk only.
- Heavy commands go through the host's heavy slot. No paid API calls beyond normal account use.
- Time box: three working days from the first workflow start. Stop and report at the box or on a stop condition.
Steps
1. Baseline (first, before any workflow is written)
Objective: numbers to compare against, taken from recent ordinary deliveries.
Acceptance: a comment here with, for the last 10 merged loop-zero PRs: time from first commit to merge, CI runs and merge-queue entries per PR, changed lines per PR, and for the features they belonged to, the count of coordinator interventions that can be found in the record (stops, re-homes, manual resumes). State what could not be measured.
2. Compatibility probes on a disposable workflow
Objective: learn the engine's real behavior before trusting it with a feature, following docs/T3-UPSTREAM.md step 4.
Acceptance: a comment here recording the installed version and, for each probe, expected and observed result:
- a plain step, an agent step with a typed return, and a question to the owner all complete;
- a server restart in the middle of a run resumes without repeating a finished step;
- a failed agent step pauses the run, and how that pause is noticed without a person watching;
- starting twice with the same key creates one run;
- an agent step that runs a
loopzerocommand in aloopzero startworktree works under the intended runtime mode with no approval stall; - whether typed results are available to
delegate_taskchildren or only to launched threads.
Stop condition: any probe showing lost state or a repeated external effect ends the experiment at this step.
3. Pick the feature
Objective: one open loop-zero issue that splits into two to four PR-sized slices.
Acceptance: the issue is named here with its slices. It must not change review, readiness, merge authority, trust boundaries or sandboxing, so a failed experiment cannot damage the delivery gates.
4. Write the workflow
Objective: one workflow definition that takes the feature issue and runs:
- a planning agent returning the slices as typed data;
- per slice: an implementing agent in its own
loopzero startworktree,loopzero check, a local review round, a branch push without a PR, and a short milestone comment on the feature issue; - a publish stage that, per slice in order, runs
loopzero pr,review,ready --waitandmerge; - a question to the owner only for a decision reserved to a person.
Acceptance: the definition loads, a dry run on a throwaway issue reaches the publish stage without publishing, and the definition text is attached here. Models and effort come from models.toml.
5. Run and measure
Objective: deliver the chosen feature through the workflow inside the time box.
Acceptance: a comment here with the same measures as the baseline, plus:
- every human or agent intervention outside the workflow, with its cause;
- behavior on each failure or restart that occurred;
- PR sizes against the existing size caps, and any drift or conflict with main at publish time;
- what the owner could see about progress while work was unpublished;
- the sections of
docs/DELEGATION.mdthe run made unnecessary, listed by heading with line counts.
Stop conditions: a duplicated external effect (PR, comment, merge), lost run state, or more interventions than the baseline feature needed.
6. Report and decision discussion
Objective: an owner decision on the direction.
Acceptance: a report on this issue that leads with the recommendation and separates measured facts from interpretation, followed by a discussion with the owner that settles:
- coordination layer: move to workflows, use workflows for periodic jobs only, or stay as is;
- publish unit: a stack of small PRs per feature, or one PR per feature;
- progress visibility: milestone comments on the feature issue, or the T3 Workflows page only;
- owner decisions: workflow questions in the app, or
p0issues as today; - whether the architecture guide's boundary on schedulers and ledgers changes.
If the decision is to adopt, the next deliverable is a design document and an architecture guide update, filed as its own issue. This issue closes with the decision recorded in a comment.
Out of scope
Changing loop-zero code or documents, upgrading T3, moving periodic jobs (status run, session cleanup) to workflows, multi-repository projects and linked environments.
Activity
eowca commentedon Nov 26, 2026
Start condition checked on the sole host planned for this experiment. The active
t3code.serviceExecStart and the running process executable both resolve to~/.t3/runtime/versions/0.1.12/t3. That executable reportst3 v0.1.12. From the builder session,t3 workflow list --jsonexited 1 withWorkflows are off on this server.The version requirement is met. The running server needs Settings → Labs → Workflows enabled before this session can run the experiment. Stopped before baseline collection, feature selection, or workflow creation. No host settings were changed.eowca commentedon Nov 26, 2026
Start and scope amendment (Owner Decisions ruling, 26 Nov 2026 ~17:20Z, recorded by the Lean line)
loopzero startworktree only, heavy slot, branch pushed after each step, gates unchanged, three-working-day box.eowca commentedon Nov 26, 2026
Amendment 2 (Owner Decisions ruling on Marcin's "start now", 26 Nov 2026 ~17:30Z, recorded by the Lean line)
loopzero startworktree only (never the live IntelFlo checkout), heavy slot, branch pushed after each step, gates unchanged, three-working-day box. The risk is only wasted Claude-a time.eowca commentedon Nov 26, 2026
Second workflow (IntelFlo outcome 3 backend gap) started — Lean line, Claude account a.
~/.t3/workflows/outcome3-backend.ts(workflowoutcome3-backendv1), text below. It will be re-attached in final form at the end.o3-dry-1(run 9929da94…), 17:26:59Z–~17:31Z: completed all 27 pre-publish steps (probe gate, typed plan, issue/claim/build/local review/push/milestone per slice) and returnedreachedPublish: truewithout publishing. Cheap model, no edits, no issues, no pushes.o3-live-1(run a585b049…) started 2026-11-26T17:30:10Z. Time box: three working days from then.W573-STOP(or a failed probe written with uppercaseFAIL/FAILED) stops it at that boundary. I also check by hand at each boundary.intelflo-workersT3 project, bound toloopzero startworktrees; never the live checkout.outcome3-backend.ts (v1)
eowca commentedon Nov 26, 2026
Step 1 baseline (26 Nov 2026, ~17:25Z, GitHub REST only). Last 10 merged PRs per repository. Raw rows:
~/.cache/lz-logs/lean178/w573-baseline-{lz,if}.jsonon miki (scriptw573-baseline.py).Reading (my interpretation): IntelFlo is where the payoff lies. A PR there costs about 61 workflow runs, roughly half on the queue candidate. Two of 10 IntelFlo PRs entered the queue twice (#14654, #14663), and each re-entry adds about 30 runs. On loop-zero, 4 of the 10 PRs are slices of one feature (#575: #1953, #1961, #1963, #1964). Each slice paid its own ~21 runs and queue entry, so publishing that feature as one unit or a stack is what step 5 should compare against.
Coordinator interventions: only a keyword proxy. I counted non-bot comments on the PR and on its linked issue (from the branch name) that match stop/re-home/handover/resume/adopt/restart/stall. loop-zero: feature #575 9 of 38, #537 4 of 7, #1388 1 of 6, the rest 0. IntelFlo: #12799 6 of 26, #13224 2 of 21, #14661 1 of 5, the rest 0. These are upper bounds: a match is often a status line, not an intervention.
Could not be measured:
statev2.sqlite), which was not mined.@mergifyio queuecommands, not from Mergify events.eowca commentedon Nov 26, 2026
Step 2 compatibility probes (26 Nov 2026, 17:23–17:29Z). Version: miki
t3code.serviceruns~/.t3/runtime/versions/0.1.12/t3, andt3 --versionreports v0.1.12. Workflows are on (workflowsEnabled: true). Single host. Disposable definition:~/.t3/workflows/w573-probe.ts. Each plain step appends one line to~/.cache/lz-logs/lean178/w573-effects.log, so a repeated external effect would show up as a duplicate line. No probe showed lost state or a repeated effect, so the stop condition did not trigger.f5d500b0: plain done; agent (Codex gpt-6-luna, models.tomlfast) returned{answer: 42, word: "ok"}through the output schema;asklisted byt3 workflow questionsand answered witht3 workflow signal(recordedansweredBy= the answering thread; answered by this agent, not by Marcin). Then the run paused because my definition returned a non-JSON object. I fixed the file and rant3 workflow resume; the run completed.--base-dir, own user unit, port 35997): (a) restart during a 3-minutesleep→8f5b2d46completed,before-restartwritten once; (b) restart during an in-flight agent turn (itssleep 60was killed) →ee1b2f02completed on the same thread, attempt 1, 64 s later;before-agentwritten once.c708714c: agent exceeded its 90 s timeout → runpaused, detail "the agent's turn was stopped: it was not done after 1m 30s".t3 workflow resumeafter the fix condition → attempt 2 in a new thread, completed;before-failwritten once. Noticing: nothing pushes to any agent thread. The engine emits aworkflow.run_pausedmilestone event, available to MCP event subscribers and event webhooks but hidden from threads, and nothing on miki subscribes to it today. An unattended poll oft3 workflow list --json(statuspaused) found it. Step 4 needs a watcher (poll or event webhook).t3 workflow start --key w573-p1-awith different input returned the same run idf5d500b0; one effect line.loopzeroin aloopzero startworktree, no approval stallworkspace: {type: "existing_worktree"}toloopzero start w573-probe-scratch. full-access:pwd, branch andloopzero statusran with output identical to a direct run; exit 1 = GitHub REST core quota at 0 at that moment, same as the direct run. auto: Codex's sandbox madeloopzero statusdie with a Python traceback. Neither mode stalled for approval. Intended mode for loopzero steps: full-access.delegate_taskchildren or launched threads only?delegate_taskhas no output-schema parameter.t3_thread_launch,t3_thread_sendand workflowagent()steps take one; the agent answers witht3_submit_output. Typed results are therefore available to launched threads and workflow steps, not todelegate_taskchildren.Other findings for step 4:
.tsfiles that Node imports directly, with no sandbox, so a step can do any I/O.askreturns to the script did not carry.choicein my test (the field came back undefined), although the stored step result has it.