Skip to content

spec(FIX-1690): a person can't send a message into a worker's session from App Lab - #2525

Merged
jhoffner merged 2 commits into
mainfrom
spec/FIX-1690
Oct 1, 2026
Merged

jhoffner merged 2 commits into
mainfrom
spec/FIX-1690

Conversation

@jhoffner

@jhoffner jhoffner commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator
Someone who… Today After
types @coder … in a workstream's composer Send is disabled The line goes into the coder's current task run here; delivered shows once that run's session holds it
types in a task's composer while its run works The composer is disabled The run stops and continues the same coding session with the person's words as its next prompt; edits and the harness's memory carry over
replies from an Inbox item Approve or Reject only A reply box sends into the asking worker's session through the same door; where the kind takes no message (DevForce's EM), it says so
talks to a worker between attempts, or parked on its own question n/a The line is kept and handed to the next attempt; it never answers the question
talks to a finished task n/a Send is disabled: a finished task takes no message

Goal: a person's line, from any of App Lab's three composers, arrives as a turn in the session of the worker it addresses, including a coding run that is working right now, and the run acts on it; the app shows it as delivered only once that session holds it.

flowchart LR
  L["DevForce on the scripted harness · a coder run held open"] --> A["App Lab in Chromium · task composer, then @coder"]
  A --> R["read the run session and the harness stub's own record"]
  R -->|"line in the session before delivered shows · run stopped · next attempt resumed the same coding session with the line · retry standing unchanged"| P["PASS · goal met"]
  C1["control · the composer draws delivered without sending"] -.-> A
  C2["control · the next attempt starts a fresh coding session"] -.-> A
  R -.->|"under either control"| F["must FAIL · names the signal"]
Loading

The check reads the store and what the stub harness was handed, never App Lab's own state. Check: goals/app-lab/it-sends-a-turn-into-a-seat-session/, controls GOAL_CONTROL=optimistic-turn and GOAL_CONTROL=fresh-session; the real-model half is FIX-1663's a4. Why this goal: SPEC.md.

Before: all three composers stop at a disabled line. After: each picks a target session and calls the door that session's kind declares; for a coding run, the harness manager's door keeps the line, stops the attempt through a generic stop hook, and the next attempt continues the same coding session with the line as its prompt

Three composers, one door. Each picks which session it means; the session's own kind decides what a turn does there.

How: Core's existing userMessage already writes a person's line into a session; the door is the kind's one action that declares it. For a coding run, the harness manager runs the ask path backwards: keep the line, stop the attempt (one new generic hook: a block stops another request in its own session), park without charging an attempt, resume the same coding session with the line as the prompt.

Sign off

The goal, at that size: every composer reaches the session it names, a running coding run included, by stop-and-continue. If wrong: a person is told a run heard them when it didn't, which ER-15 forbids.

Open: two. The first is the one to weigh.

Open · Live delivery mid-step, or stop-and-continue for every harness first?

Stop and continue on every harness, recommended, beside live mid-step delivery on Claude Code and Cursor. Decides it: all three harnesses resume today, and live delivery still needs that fallback. Price: the current step is cut

In plain terms. To hear a person mid-run, either the harness takes the line while it works, or we stop the run and continue its session with the line as the next prompt. Claude Code and Cursor can take a line mid-run; Codex can't. All three can resume a session today.
The trade-off. Live keeps the step the run is on; stop-and-continue cuts it and costs a few seconds. Live needs a second generic hook in Core and Engine, a change to Claude Code's main loop and a Cursor change: about two more PRs before the closure.
Recommendation: stop-and-continue now, for every harness; live delivery as a follow-up that plugs into the same door, so nothing is thrown away.
What would change my mind: losing the current step is unacceptable for the design's main control, or a4 shows the restart confuses the model.
If wrong: runs restart on every message until the follow-up lands. Choosing live when this was enough costs two PRs and a riskier Claude Code change before the closure.

Open · DevForce's only asking worker takes no message: grade Inbox's reply elsewhere, or give DevForce's EM a door?

A fixture seat that takes messages, recommended, beside a door on DevForce's EM. Decides it: the scripted EM has nothing that could read a message. Price: DevForce shows the reply disabled

In plain terms. Inbox's reply goes into the asking worker's session. In DevForce the only asker is the scripted EM, with no model: nothing in it could read a line, so its reply box can only say so. FIX-1663's Part 4 expects a reply to land there, which can't pass as written.
The trade-off. A fixture seat proves the path honestly, but you won't see a working reply in DevForce. A door on the EM passes the closure as written, with a line nothing ever reads.
Recommendation: grade it on a fixture seat in this issue's check, and amend FIX-1663's Part 4 run line by a follow-up PR.
What would change my mind: DevForce's EM is meant to converse; then it needs a model and a real door.
If wrong: DevForce's Inbox shows a disabled reply until its EM can talk. The stub door instead ships a delivered nobody reads.

Each seat kind declares its door, and all three composers call it · D1

Each kind declares its door, chosen, beside one channel action that routes it. Decides it: what a turn does belongs to the target kind. Price: one convention for kind authors

It comes down to who knows what a turn means: only the target's kind. If wrong: kind authors learn one convention, and a kind with two such actions fails its hire.

Reasoning and what lost: DECISIONS.md. The cases: BUSINESS-RULES.md.

Reviewers · look here

  • Plan → S5 and S6, the stop-and-continue trip. Park-for-turn, the existing unpark and drain, one discount term beside abandonments: is the ask path reversed the right shape, and is that discount (BR-9) the right place for it?
  • Decisions → D1. Is "the kind's one public action with userMessage and { message }" a door Workforce can own without a new mechanism, or does it need a declared one?
  • Rules → BR-4 and BR-11. Delivered vs a door that races a finishing run.

Not here: answering an ask (FIX-1671), filing with a notify (FIX-1474), a seat's own conversation outside a task, live mid-step delivery (the first fork's follow-up).

Spec · Decisions · Rules · Plan · Docs · Evolution · Linear FIX-1690 · epic FIX-1649 · answers FIX-1664's open fork, builds on FIX-1662, FIX-1664, FIX-1668 · Large, 3 PRs (stop → door → lab) touching core, engine, orchestration, harness-manager, workforce, labs/app-lab, goals/devforce-lab · merges after human approval and required checks

Engineering calls, decided rather than asked
  • @worker targets the worker's current task run in this workstream; several → the composer asks which; none → disabled with a line.
  • Delivered = the door's request completed and the target session holds its user item.
  • A turn never spends the retry budget (small orchestration change); an answer's charge today is flagged as a follow-up.
  • A turn to a parked or pending-with-link row is kept for the next attempt and never unparks a question.
  • The door checks the run's owner, as the manager's answer does (BP-031).
  • A harness that can't resume (claude-code/cli-remote) takes no turn.
  • Also post to the workstream stays a gap (FIX-1474).
  • Validation note: the spec's validator sub-agents (Step 5) weren't available in this session; the factual claims were checked directly against the code and vendor typings (Claude Agent SDK streamInput, Cursor SDK 1.0.31 Run.steer, Codex SDK 0.152.1 one prompt per turn, applyClaimToTask charging every claim).
How to review this — altitude, what's in scope, what's deliberately unsettled

This is a direction set, not an implementation. Reviewing it well means
answering one question: is this the right approach?

In scope to challenge:

  • The goal and the problem framing in SPEC.md — is the goal the real need at full size,
    for the people named, or a smaller goal that would let us call this done early? Would the
    named check fail if the goal were not met?
  • The approach — will it work, does it fit the architecture and docs/philosophy.md?
  • Any numbered decision in DECISIONS.md — that's the sign-off surface.
  • A case BUSINESS-RULES.md misses, or a rule that would invalidate the design.
  • Scope — a deliverable that shouldn't ship, or one that's missing.
  • The reader-facing promises in DOCS.md and their fit with the rules; a missing or
    misleading lineage claim in conditional EVOLUTION.md.

Out of scope — deliberately unsettled here, and owned by the implementing agent:

  • Names, signatures, file paths, and module layout beyond the few PLAN.md pins on purpose.
  • Local structure: which helper, how a function is decomposed, error-message wording.
  • Micro-optimizations and style preferences.
  • Test names and internal test structure (the behaviours are the rules; the tests are not).
  • Anything PLAN.md left open on purpose — it is directional by design, and a gap at that
    altitude is intended, not an omission.
  • The figures, at the pixel level. A figure is right when it reads right. A misplaced label
    or a colour you'd have chosen differently is not a finding; a figure that shows a shape the
    decisions don't say is.
  • The solution sketch, at the line level. PLAN.md may include a rough pseudocode sketch
    showing the shape of the proposed solution. It is knowingly incomplete, is not real code,
    and is not what will ship. Review it for directional viability only. Do not report
    that it lacks error handling, omits edge cases, names things that don't exist in the repo, or
    wouldn't build: all of that is true on purpose.
  • POC implementation polish. Experiments under the owning spec's poc/ are retained,
    not production code. Read them for directional evidence, not production completeness.
    Their isolation from production/default discovery and absence of secrets or generated
    dependencies are in scope; retention is not permission to weaken repository checks.

One request, if you are an automated reviewer: the two lists above are the whole difference
between a useful review of this document and a long one. Volume is not signal here — a single
finding above the line is worth more than twenty below it.

Feedback in the second list is welcome and gets recorded verbatim in PLAN.md → Notes from review for the implementer to weigh against real code. It will not be argued with, and it
will not be folded into the design prose. Please don't re-raise it: one mention is enough.

The one exception is the sketch and the POC. Line-level feedback on either is dropped, not
recorded — there is nothing for an implementer to weigh about code that isn't shipping. Feedback
about their direction is not line-level and is treated like any other above-the-bar finding.

Direction approval does not waive merge-time required checks, approvals or thread policy.
Optional comments do not require another design round merely to reach zero comments.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq


Generated by Claude Code

Retained spec set: one door per seat kind over Core's existing
userMessage, a running coding run reached by stop-and-continue through
one generic stop hook, four PRs. Two open forks: live mid-step delivery,
and where Inbox's reply is proven given DevForce's EM takes no message.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
@jhoffner jhoffner added the spec label Sep 30, 2026 — with Claude
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Sep 30, 2026 11:57pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Sep 30, 2026 11:57pm UTC
flow-state-dev-ui Ignored Ignored Preview Sep 30, 2026 11:57pm UTC

Request Review

@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

FIX-1690

Copy link
Copy Markdown
Collaborator Author

Second look + architecture pass (direction-level only)

The direction is sound: one door per kind, userMessage reused, and stop-and-continue over live steer. I agree with both recommendations. Items below are ranked. 1–3 are above the bar; 4–6 are for the implementer to weigh.

1. S4 keeps a second copy of a fact the session already holds (simplification, above the bar)

BR-3 has the engine write the person's line into the run session as a user item before the door's block runs. S4 then adds a durable, create-only "turn record" collection keyed by issue/phase/attempt, with its own lifecycle ("never deleted by a replay", owner scoping). Two stores now describe one event. BR-4's "delivered = the session holds the item" and S6's "untaken turn exists" can disagree, for example after a replay.

The "keep the line before the stop" guardrail is already met by the engine's write. The leaner shape: the next attempt reads user items in the run session since the last attempt's cursor, and the cursor is the only new state, on the row or run record. That drops S4 and most of BR-10/BR-12/BR-13's bookkeeping, since "kept for the next attempt" becomes "the item exists". If a session read from inside the attempt isn't available to the manager, say so in PLAN; that is the only reason I can see for S4. Otherwise please justify it against this shape.

2. Abort granularity: what does the stop actually kill? (risk, above the bar)

S1/S2 reuse the abort route's path, which sets abortRequested on a request and ends with the record aborted. The plan says the attempt then "parks for a turn" and the board re-queues. The spec's premise is that the attempt is its own request. The "At implement time" note, "on a handed-off board the drain that dispatched the attempt may still be waiting… or may have exited", says otherwise: the attempt may share a request with the drain. Aborting that request also kills the drain, and the park write then happens from a request already being torn down.

This decides whether S3/S6 are a small change or a rework of the ask path, so it shouldn't wait for implement time. Please pin in PLAN that the attempt is aborted in isolation (its own request), or that the park/re-queue is written by the door rather than the dying attempt. The second is also the safer BR-7 shape: the door already holds the row and can write the transition after it observes the stop, so the attempt needs no "stopped for a turn" reason channel. That also resolves the "where does the attempt learn it was stopped" open item.

3. The real-model check never cuts a run mid-tool (verification gap, above the bar)

S7 and V4 hold attempt 1 by telling it to wait. The scripted stub in the app-lab goal is "held open until stopped". Neither exercises the case that will be normal in practice: the harness killed while a tool call is in flight (a half-run shell command, a half-written file, a dangling tool_use with no result), and then resumed by session id. Whether each harness accepts a resume in that state is exactly the kind of disputed behavioural claim that settle-claim exists for. Fold a mid-tool cut into S7, or settle it in a POC before door is built, because the whole trip depends on it.

Related: the turn prompt section (see the "three channels" guardrail) should say the previous step was cut short by the person, not failed, so the model re-checks any half-applied edit. As drafted, the prompt carries only the person's words.

4. Refactor worth doing inside stop (architecture)

S2 says it "shares one helper with the route". Make that explicit as a deliverable: extract the fenced setFieldsIfStatus + abortRequest(requestId, incarnation) sequence out of handleAbortRequest into the helper, and have the route call it. That extraction is what stops a second copy from drifting. It also gives the conformance tests one place to hold the cross-session and terminal cases that V1 lists. No broader engine cleanup is warranted.

5. Door discovery by shape makes the pinned message name redundant (minor)

S8 finds the kind's door by userMessage + { message }, so nothing needs the name message. Pinning it couples DevForce's README to a convention the hire logic already doesn't need. Keep it as a suggestion, not a pin. Since the agent kind's door is run, also confirm a kind with a run-shaped action plus a deliberate door is handled by BR-2 (two matches) rather than silently preferred.

6. Fork 2 is barely a fork (process)

The alternative is a door that says "delivered" to a worker that cannot read, which ER-15 forbids outright. It reads as a decided call plus a required FIX-1663 amendment. Consider moving it to "Decided, not asked" and leaving the PR's sign-off ask as the one real fork (live vs. stop-and-continue). That keeps the product owner's attention on the choice that has a cost.

Looks right (no change)

  • BR-9's no-charge re-queue, flagged separately from the answer path's charge.
  • The door deriving task, row and owner from server state only (BP-031).
  • Keeping Core/Engine free of Workforce words.
  • Rejecting restart concurrency: a person's turn can't be told from an Interrupt there.

Verdict: direction approved in principle. Items 1 and 2 could change door's shape, so resolve them before it is planned in detail.


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Simplify review (spec PR)

Verdict: The architectural direction looks like the cleaner option among what the spec compares. D1 (each kind declares one userMessage door; composers call it on the session they already know) reuses Core’s existing hook and avoids the channel router and App Lab kind tables the spec rejects. Stop-and-continue first, with live delivery filed as a follow-up, is the right default for closure cost and Codex coverage. The DevForce Inbox fork (fixture seat vs stub EM door) is the honest reading of ER-15.

I do not think the issue went too far at the product level. Complexity concentrates in the implementation plan (four packages, a new stop entry point, a turn collection, orchestration unpark semantics). That may be necessary given stop-and-continue + BR-9 + interrupt/turn distinction — but a few surfaces look mergeable or better justified before implementation.

What already looks minimal

  • One App Lab send helper (S10) and static V7 — good restraint vs composers each calling the engine.
  • Rejected alternatives in DECISIONS.md (abort-then-door, polling collection, restart policy, invent-kill channel post) show the spec did not accumulate dead paths.
  • Reusing the ask path shape (park → unpark/drain → resume session) matches existing harness-manager vocabulary instead of inventing a parallel “steer API.”

Simplify opportunities (non-blocking; consider before or during implement)

  1. S4 turn collection vs session userMessage item (dual persistence). BR-3/userMessage already writes the line into the session for delivery (BR-4). S4 adds a second durable store for prompt assembly and abort discrimination. That parallels inbox/ for answers (not wrong), but the why session alone is insufficient is buried in PLAN “At implement time” rather than a short decided note next to the dropped polling alternative. Either add that paragraph to DECISIONS.md, or — if implement proves session-scoped turns suffice — collapse S4 into S5/S6 and drop a surface.

  2. S3 orchestration “re-queue without charging”. @flow-state-dev/orchestration already documents that unblock, unpark, and reclaim do not spend the retry budget. Before adding a new transition, the implementer should spell whether a new park reason (“for a person’s turn”) + existing unpark/drain is enough, or a new cap is truly required. That could shrink S3 from “new edge” to “new park label + harness-manager wiring.”

  3. PR count. seat-door (S8 + docs only) is small next to lab. Three PRs (stop, door, lab including S8) would be simpler to land if ownership allows — same dependency graph, one fewer review unit.

  4. Spec bulk (maintainability, not behavior). ~300 lines of duplicated CSS across the three fork SVGs; DECISIONS.md “Decided, not asked” overlaps many BR rows; BR-12–BR-16 could be one row-state matrix. Worth tightening in a follow-up amend so FIX-1663 wording changes do not drift across two files.

  5. Stop hook vs abort route. Plan guardrails already say “share one helper.” Add one explicit sentence for implementers: same fenced abortRequested write, different semantic on the harness-manager side (turn-park vs failure) — not a second HTTP path for App Lab.

Skipped (would need your call, not tidy-up)

  • Live delivery now (open fork #1) — spec frames the trade-off; no simplify nudge beyond what you sign.
  • Merging turns/answers/feedback into two channels — plan guardrails intentionally keep three.

Sign-off surface

Two open forks plus D1 remain the right gate. After you pick fork answers, this spec is ready to implement with the plan tweaks above kept in mind.

No code changes from this automation run.

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

Comment thread specs/issues/FIX-1690/PLAN.md Resolved
Comment thread specs/issues/FIX-1690/PLAN.md Resolved
Comment thread specs/issues/FIX-1690/PLAN.md Resolved
Comment thread specs/issues/FIX-1690/DECISIONS.md Resolved
S3 becomes wiring over the existing unpark plus one discount term in
shouldRetryOnFail; S4 kept with its reason in DECISIONS; seat-door folded
into lab (three PRs); stop hook vs abort route sentence; spec bulk noted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
@jhoffner
jhoffner merged commit 9b19393 into main Oct 1, 2026
13 checks passed
jhoffner pushed a commit that referenced this pull request Oct 1, 2026
Post-merge amendment of the retained closure spec (original review #2426):
- names, paths and commands follow the Shift Manager rename (#2588)
- leg c sweeps the promised set: message, reasoning, tool, code block and
  ask cards, plus the devtool page (#2532)
- a4 targets eng.coder's running task session (FIX-1690: #2538/#2544/#2565)
- Part 4's Inbox reply is graded on FIX-1690's test seat (#2525)
- a2 runs without --devtool; Shift Manager serves its own (#2531)

Recorded in DECISIONS -> How it got here, and a new EVOLUTION.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants