Repository navigation
Description
Follow-on to #205. That ticket gives the supervisor a reader over generic platform records. This one makes the coding domain write enough into those records for the reader to see it — the other half of "the domain writes into a generic record; the supervisor reads platform records."
No supervision-side change is needed for any of this, which is the evidence the boundary is right.
A. A human-driven coding session is invisible
Starting a session from the Coding tab writes only coding_sessions. It creates no board card and no loop run, so a Lead cannot answer "is anyone working in the API repo right now" — the most common case, and half of what the hardcoded Overseer assembles per repo (routes/coding.ts:1122-1131).
Fix: lib/coding-board.ts (new, pure, mirroring lib/delegation.ts) emits a generic record —
codingSessionTaskRecord({sessionId, repoName, engine, status, now}) → id csess-${sessionId}, type coding.session, title Coding: ${repoName}. Precedent three lines away: routes/coding.ts:760 already writes an engine.signin card via mirrorRuntimeTask.
No column declaration needed — coder-repo declares no boardColumns, so defaultBoardColumns(["coding"]) already maps running→"Running" and completed→"Done".
The trap, and the reason this ticket exists separately. A session leaves active in four places, and only one is the end route:
routes/coding.ts:1336—endSessionlib/coding-store.ts:403— insidereconcileOrphanedSessions, the reapersuspendSessionsFromOtherNodes(routes/instances.ts:328) — suspends rather than endsCodingSessionWorkflow'sfinally— rawUPDATE coding_sessions, not viaendSession
Writing the card at create and clearing it only at (1) strands a permanently "running" card on three paths — the exact failure mode this whole feature exists to remove, and the same shape as the two stranded-row bugs already memorialised in coding-session.ts:122 and :158.
Recommended: make endSession the single choke point (have the workflow call it instead of raw SQL) and mirror the card from createSession + endSession. mirrorRuntimeTask upserts on id, so re-writes are idempotent.
Note this also puts a live session on the Repo Coder's own board for the human. Confirmed wanted — a live session is exactly what belongs on a work board.
B. The Pilot never reports mid-run progress
AgentLoopWorkflow calls recordIteration per iteration (workflows/agent-loop.ts:144). CodingSessionWorkflow does not, so check_delegation and subordinate_status both report iteration: 0 for a run that has taken a dozen steps — the supervisor's only progress signal, permanently reading zero.
Fix: hoist let pilotSteps = 0 above closeDelegation, increment on the "action" branch of the existing onEvent dep, and call recordIteration when loopRunId is set. runCodingLoop already emits exactly one "action" per step (lib/coding-loop.ts:118), so no extra durable steps.
Compute the increment outside step.do — a retried step re-runs its body, and ++ inside would double-count.
A second bug rides on this. CodingSessionWorkflow runs runCodingLoop in up to 12 rounds, and runCodingLoop restarts its step counter at 0 each round. So today's terminal recordIteration(env, runId, outcome.steps) records the last round's count, not the cumulative one — it understates even at the end. Fix with Math.max(pilotSteps, outcome.steps ?? 0).
Activity
feat(coordination): subordinate_status — give the Lead a global pictu…
feat(supervision): a coding session is a board card — make coding wor…
serge-ivo commentedon Aug 5, 2026
Shipped in
75e2d51(deployed).Verified live, both halves of the acceptance criterion:
Coding: fws/platformcard appeared in Running on its board.subordinate_statuscall and zerodelegate_goalcalls** (tool log ininstance_messages`), correctly reporting FWS as having a live coding session and FAS/FGS as idle. Before this it had no way to see a human-driven session at all.running.Supervision still reads only platform records; the coding domain writes the generic one. Also fixed en route: the Pilot workflow's raw
UPDATE … WHERE status = 'active'silently skippedsuspended, so a Pilot finishing after a--forcetakeover elsewhere left its session suspended forever with nothing to close it — it now goes throughendSession. AndrecordIterationnow fires mid-run, so a supervisor no longer reads "iteration 0 of 10" for a run a dozen steps deep.serge-ivo commentedon Aug 5, 2026
Correction: the commit is
14828f3, not the hash in my previous comment.feat(coordination): pipeline cards, a live progress line, and a sweep…
fix(coding): one driver per engine — a session can only be driven once (
feat(loop): one Loop, in the one chat — the driver comes from what th…
fix(coding): the single-flight claim covered 1 of 3 paths that start …
feat(loop): the instructions a loop sends on your behalf now appear i…
fix(coder): "Work on this" actually starts work, and a coding agent g…
fix(coder): let an agent describe and observe its own work (#254, #255,
fix(coding): a coding card follows the RUN, so a handoff reaches "Nee…
feat: application execution runs on Board/Kanban (#978)
feat: durable scan scheduling and per-scan observability for the Job …