Skip to content

test(workforce): bound the next host's shutdown drain in the call crash tests (FIX-2269) - #4204

Merged
jhoffner merged 16 commits into
mainfrom
claude/project-thread-d2ex6z
Oct 29, 2026
Merged

jhoffner merged 16 commits into
mainfrom
claude/project-thread-d2ex6z

Conversation

@jhoffner

Copy link
Copy Markdown
Collaborator

Requested by Jake · project thread

What's red

On main (df92436), both tests in packages/workforce/test/worker-calls.test.ts → "a call whose process dies before it parks" fail with Hook timed out in 10000ms at the afterEach dispose. This happens 3 out of 3 times locally, and it turns Test (2/3) red on unrelated PRs (for example #4193).

Why

#4078 (FIX-2269) and #4013 (FIX-2145, per-worker token usage) each passed on their own. They fail together:

  • Since feat(workforce): per-worker token usage (FIX-2145) #4013, a worker's request owes a request-end hook from the moment it starts (worker usage).
  • The crash test runs two hosts in one process. The first host's frozen request never ends, so it never pays that hook.
  • The record of owed hooks is kept per process (request-end-hooks.ts), not per host. So the next host's dispose() waits out the full 10 s shutdown drain for a run that will never end, and the hook times out.

Bisected: with #4013 reverted locally, the tests pass on main. Reverting #4149 alone doesn't fix them.

Fix

This is a test-only change. The test now disposes the next host's router with a 100 ms drain (disposeFlowApiRouter(router, { drainMs: 100 })) before disposing the host, the same pattern orchestration/test/tasks/notice-after-crash.test.ts uses. The next host's own work has already settled by then (next.settled).

In a real deployment the dead process's debt dies with that process, so nothing changes at runtime. One thing worth noting, but not changed here: a router's shutdown waits on request-end hooks from any router in the process, not only its own.

Verification

  • worker-calls.test.ts: red on main (2 failed, hook timeout) → 11/11 green with this change.
  • integration-tests scenario wait-killed-before-it-parks: 2/2 green on main.

No changeset needed (test-only).


Generated by Claude Code

claude added 14 commits October 28, 2026 18:51
…t parks

A wait that starts its own work (dispatcher({ wait: true }), a worker's
call) now owes its park through the new optional RequestWaits.owingPark
verb. The engine keeps the obligation as an engine-owned wake on the
request's session; the durability sweep continues an interrupted request
that still owes one, and its replay parks on the work it already started.
The park, the wait's return or throw, the request's end and a stop clear
it; past 10 minutes from the first owe the request is left interrupted.
History, retention and waits.ended read an owed request as parked.

A call's repeated send now dispatches itself on a flow with a pass, so a
call continued after dying between its row and its dispatch has a request
to wait on and is answered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
…dispatcher out

Codex review on #4078:
- P2: a stop could land between the sweep's read of the owe and its
  continuation. The stop now lets the owe go under the request's lease,
  and the sweep's admission reads the owe again under it; a stop that
  finds the lease held answers already-resolved.
- P1: runOnce records only after its function returns, so a waiting
  dispatcher that died after its child was accepted would dispatch a
  second child on the continuation (the seam takes no stable request id).
  The dispatcher no longer owes a park; only the call does, whose message
  id is kept first and taken once. Recorded in DECISIONS for Jake's call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
Codex review on #4078 (P2): drivenAgain checked the owed park only when no
gate was logged, so a request whose earlier wait's gate was answered and
pruned, and which then died in a later call before parking, read as ended
to waits.ended and retention. The owe is now read first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
Codex review on #4078 (P2): a call continued after dying between paying
its budget and writing its row repeated payPlace with the same message
id, counting it twice against the request (refused under perTurn: 1) and
appending it twice to the chain. The request now names the ids it paid
for and the chain appends an id once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
Codex review on #4078 (P2): runAction cleared the owe right after the
gate was written, before the suspension item reached the request's log.
A death in between left an interrupted request with an unlogged pending
gate (which the resume refuses as busy) and no owe to continue it. The
owe is now cleared after the suspension item is flushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
…owes it

Parallel waits in one request share the request's owed-park wake. The
wrapper now counts them and clears the wake only when the last settles,
and never once one has parked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
A host dies after the turn's send is recorded and before its gate is
written; the next host's sweeps continue the request, which parks on the
send it already made and is answered in the same request. The control
drops the owe and stays interrupted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
…-d2ex6z

# Conflicts:
#	packages/engine/src/context/createExecutionContext.ts
#	packages/workforce/src/messages/send-message.ts
…sh tests (FIX-2269)

Since per-worker token usage, a worker's request owes a request-end hook
from its start. The dead host's frozen request never pays it, and the
debt is kept per process, which both test hosts share, so the next
host's dispose waited out its 10 s drain and the afterEach hook timed
out. Dispose its router with a short drain first, as the orchestration
crash test does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
@vercel

vercel Bot commented Oct 29, 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 Oct 29, 2026 9:48pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 29, 2026 9:48pm UTC
flow-state-dev-ui Ignored Ignored Preview Oct 29, 2026 9:48pm UTC

Request Review

@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

FIX-2269

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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-10-29T21:43:30.096137Z c82bfb1 New commits
ℹ️ 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.

@jhoffner jhoffner self-assigned this Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Second look + architecture

Verdict: the test-only fix is fine to merge as a stopgap. Two follow-ups are worth deciding on.

Second look (is there a better approach?)

  • The bug is in the engine's shape, not the test. owed in packages/engine/src/execution/request-end-hooks.ts is a module-level Map, so drainRequestEnds(budgetMs) (called from the router's dispose, createFlowApiRouter.ts:~712) makes one router's shutdown wait on requests owned by any other router in the process. This PR's description notes that and leaves it. In production a dead process takes its debt with it, so nothing is visible there. But the same thing is reachable without a crash: two hosts in one process (tests, dev servers, multi-tenant embedding), where one has a long-running request that owes a hook, and the other's dispose() stalls for shutdownDrainMs.
  • Cleaner option (small): have each router own its owed set and pass it to createExecutionContext/createRequestEndRegistry, so drainRequestEnds drains only that router's requests. That removes the need for every multi-host test to know about this and use the drainMs: 100 workaround. It is a more invasive change (the registry is created in createExecutionContext.ts, so the router's set has to be threaded through), so a separate issue is reasonable rather than expanding this PR.
  • If the engine is left as is, the workaround works but it is a convention each future multi-host test must remember. notice-after-crash.test.ts already repeats the same pattern. Two copies means this is worth a shared helper, see below.

Architecture (only where this PR is the opening)

  • Small, in scope: the inline open = { ...next, dispose: async () => { disposeFlowApiRouter(...); next.dispose() } } override is the part that will get copied. If bootBoardHost in conversation-board-harness.ts took a shutdownDrainMs option (the router already supports options.shutdownDrainMs) the test would just pass { shutdownDrainMs: 100 } to next's boot and keep open = next, with no spread-and-override of the harness object and no second dispose call. That is also less fragile than the ...next spread, which silently drops anything on BoardHost that is a getter or bound to this. Worth checking BoardHost has no such members before keeping the spread.
  • Verify: that next.dispose() after disposeFlowApiRouter on the same router is idempotent (doesn't wait out the default drain again). The reported 11/11 green suggests it is, but nothing in the diff states the reason.
  • Not in scope: I wouldn't do any wider restructuring of the request-end registry here. The per-router owed set above is the one engine change that would actually make this class of failure go away.

Suggested actions for the follow-up agent

  1. (Optional, cheap) Switch the test to a shutdownDrainMs harness option instead of the dispose wrapper, if the harness can take it.
  2. File an issue for per-router scoping of owed in request-end-hooks.ts. Do not widen this PR.
  3. No changeset needed (test-only), agreed.

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 (FIX-2269 shutdown drain)

Scope: One commit on top of main — caps teardown for the crash-restart helper in callThenDie so afterEach does not sit on the default ~10s shutdown drain when the first host is intentionally never disposed.

Did the approach go too far?

No. This PR does not expand the crash simulation from #4078; it only wires the engine’s documented escape hatch (disposeFlowApiRouter(router, { drainMs })) before next.dispose(). That matches notice-after-crash.test.ts and the same ordering as @flow-state-dev/node’s app dispose. Re-running @flow-state-dev/workforce tests locally: 143 files / 1693 tests passed (includes the two callThenDie cases).

The inherent complexity lives in simulating process death (killable stores, abandoned first host, shared stores). A cleaner product shape would be forwarding shutdownDrainMs through createFlowState / bootBoardHost so open = next needs no wrapper — but that is a small engine+harness plumbing change, wider than this follow-up, and not required to ship the fix.

What I’d still consider (optional, not blockers)

  1. Presentation: { ...next, dispose: … } is the only BoardHost spread in this file. A one-liner helper (local or harness) would read the same as notice-after-crash’s explicit dispose without implying a new host shape.
  2. Magic number: 100 duplicates notice-after-crash.test.ts. A shared named constant (even a comment pointing at the sibling test) would tie the two crash-teardown tests together.
  3. Footgun (maybe): Bounded drain avoids hanging; it does not clear process-global request-end owed entries from the dead host. This describe is last in the file today — if someone adds tests after it without the same teardown pattern, they could see slow/flaky afterEach again. Worth a one-line note in the comment if you expect more crash hosts in this file.

Alternatives considered

Approach Verdict
shutdownDrainMs at second bootBoardHost Cleanest long-term; needs config forwarding not in harness today
Skip next.dispose() after short router dispose Wrong — stores/adapters stay open
drainMs: 0 Faster but fights stream-contract tests’ lesson on closing while hooks still owe
Avoid crash-restart integration test Would shrink harness complexity but loses FIX-2269 regression coverage

Verdict: Mechanism is right-sized for the problem. Approve with the optional nits above.

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

jhoffner pushed a commit that referenced this pull request Oct 29, 2026
…sh tests

The two worker-calls crash tests time out in their afterEach on main
(red since FIX-2269); this is #4204's one-file fix, ported so this PR's
CI can go green. It no-ops once main carries #4204.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiFsTymVutTnxtzVCSQ

@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.

Code Snob on 8098a66005b5996ad05b7db154735509de3022d3.

The dispose override clones the board host so one drain can run before the real dispose. This describe's afterEach already runs before the file hook that calls open.dispose(), so the 100ms disposeFlowApiRouter belongs there and callThenDie stays open = next.

A shutdownDrainMs option on the harness is the longer route. createFlowState does not forward that router option, so the option adds a field this one test would be the only caller of.

Fold that subtraction from #4205. After this PR lands, close the POC unmerged. Do not merge the POC.

packages/workforce/test/worker-calls.test.ts on the POC branch: 11 passed. The two crash tests finish in about 1.3s each.

Open in Web View Automation 

Sent by Cursor Automation: Code Snob

…st clone (FIX-2269)

Folds Cursor's review: the crash suite's afterEach disposes the router
with a short drain before the file hook disposes the host, and
callThenDie keeps open = next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
Main's README table went stale with #4183 and turns Test (3/3) red on
every PR. Written by the lab's own scripts/inventory.mjs --write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f

Copy link
Copy Markdown
Collaborator Author

Test (3/3) failed on c82bfb1, and the cause isn't this PR. labs/claude-code-style's inventory test reports that its README table has been out of date since #4183, and it's red on main (df92436) too. Nothing on main fixes it yet. a075d57 regenerates the table with the lab's own node scripts/inventory.mjs --write, which only changes two count rows. Once main carries the same change, this commit does nothing.


Generated by Claude Code

jhoffner pushed a commit that referenced this pull request Oct 29, 2026
Red on main since #4078: both hook-timeout failures in worker-calls.test.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
…(port of #4204)

Ported from #4204 so this PR's CI isn't red on main's worker-calls hook
timeout; it no-ops once main carries the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
…sh claude-code-style inventory

Both are red on main and unrelated to FIX-2332; this is #4204's change as is,
so it no-ops once #4204 merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEe3E83otCATaGAJdW
jhoffner added a commit that referenced this pull request Oct 29, 2026
* goal(FIX-2242): scene ac waits through interrupted while a park is owed

FIX-2269's durability sweep continues an interrupted call a stale threshold
later, so a:answer-in-request now follows the request until it completes or
times out instead of stopping at interrupted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9

* goal(FIX-2242): clearer wait note; regenerate the Claude Code-style lab inventory

The lab's README inventory went stale on main with FIX-2288 (#4183), which
reds Test (3/3); this is the same --write output any fix would carry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9

* test(workforce): bound the next host's shutdown drain in the call crash tests (FIX-2269)

Since per-worker token usage, a worker's request owes a request-end hook
from its start. The dead host's frozen request never pays it, and the
debt is kept per process, which both test hosts share, so the next
host's dispose waited out its 10 s drain and the afterEach hook timed
out. Dispose its router with a short drain first, as the orchestration
crash test does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEuGX4bfXGJoNxGQ6f

* test(workforce): port #4204's reshaped crash-suite drain (FIX-2269)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9

---------

Co-authored-by: Claude <noreply@anthropic.com>
@jhoffner
jhoffner merged commit 6c2f085 into main Oct 29, 2026
18 checks passed
@jhoffner
jhoffner deleted the claude/project-thread-d2ex6z branch October 29, 2026 22:21
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiERr11zgW5NZqDYMfn
jhoffner added a commit that referenced this pull request Oct 29, 2026
…ate (#4199)

* FIX-2332: Teammates lab coding runs are background tasks, not a teammate

coder leaves the teammates list and stays on the roster as the hidden worker
coding tasks go to. Each coding task shows as a background item under the
teammates and as a card in the conversation that started it; both open to the
run, read only, and its result lands as the coding task's. lead's instructions
say start a coding task. FIX-2154 D4 gets a dated amendment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi

* Port #4204: bound the crash host's drain in worker-calls tests, refresh claude-code-style inventory

Both are red on main and unrelated to FIX-2332; this is #4204's change as is,
so it no-ops once #4204 merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi

* FIX-2332: a background run gets no empty Talk column

The grid kept its 18rem Talk column while a run was open, though the panel
isn't drawn there. The column now follows the same condition as the panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi

---------

Co-authored-by: Claude <noreply@anthropic.com>
jhoffner added a commit that referenced this pull request Oct 29, 2026
…nfig (#4206)

* FIX-2335: Teammates lab drops projects for one working folder from config

The lab's host now runs on the existing constant run source, a git checkout
the operator names in TEAMMATES_WORKDIR, listed in localRepositories. Unset,
missing or not a checkout, the lab fails at start; it never falls back to the
current directory or its own checkout. Project tools, TEAMMATES_PROJECTS and
the start-up project writes are gone, and so are the header project select,
the New project form, the needs-project card and the repository approval card.
Task cards say running and done. No WORKER.md mentions a project. ER-8 and
FIX-2154 D3 get dated amendments scoped to this lab; packages/ is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi

* FIX-2335: workingFolder stays private to host.mts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

* FIX-2335: test the working folder check; drop stale header lines and unused import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

* FIX-2335: keep the approval card for any worker's waitForUser approval

The project tools were the only thing asking for approval, but waitForUser is
a control tool every agent worker has. Without the entry and answerApproval a
worker that asked would stop with nothing on the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

* Claude Code-style lab: regenerate the README inventory main left stale

#4183 (FIX-2288) changed the lab's files without rewriting the table, so the
lab's inventory test is red on main and on every PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

* Port #4204: bound the next host's shutdown drain in the call crash tests

Red on main since #4078: both hook-timeout failures in worker-calls.test.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

* Teammates lab: regenerate the README inventory after the merge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

---------

Co-authored-by: Claude <noreply@anthropic.com>
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
Main carries the stack this PR sat on as squashed commits, so the tree is
main plus this PR's own changes; ports of #4204 and the claude-code-style
inventory are now main's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd
jhoffner added a commit that referenced this pull request Oct 29, 2026
* FIX-2332: Teammates lab coding runs are background tasks, not a teammate

coder leaves the teammates list and stays on the roster as the hidden worker
coding tasks go to. Each coding task shows as a background item under the
teammates and as a card in the conversation that started it; both open to the
run, read only, and its result lands as the coding task's. lead's instructions
say start a coding task. FIX-2154 D4 gets a dated amendment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi

* FIX-2335: Teammates lab drops projects for one working folder from config

The lab's host now runs on the existing constant run source, a git checkout
the operator names in TEAMMATES_WORKDIR, listed in localRepositories. Unset,
missing or not a checkout, the lab fails at start; it never falls back to the
current directory or its own checkout. Project tools, TEAMMATES_PROJECTS and
the start-up project writes are gone, and so are the header project select,
the New project form, the needs-project card and the repository approval card.
Task cards say running and done. No WORKER.md mentions a project. ER-8 and
FIX-2154 D3 get dated amendments scoped to this lab; packages/ is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi

* FIX-2336: Teammates lab's lead becomes Chief of Staff, and acts instead of offering

The lead worker is now chief-of-staff (teammates.chief-of-staff), shown as
Chief of Staff. Its WORKER.md gains general tool-use guidance: act rather than
offer, ask a teammate now when asked about them, hand work to whoever fits, and
ask the user only what no tool can find. It adds no project text. researcher
and writer each get a line saying who they are. README, TEAM.md, tests and the
two teammates-lab goals follow the rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi

* FIX-2335: workingFolder stays private to host.mts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

* FIX-2335: test the working folder check; drop stale header lines and unused import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

* FIX-2335: keep the approval card for any worker's waitForUser approval

The project tools were the only thing asking for approval, but waitForUser is
a control tool every agent worker has. Without the entry and answerApproval a
worker that asked would stop with nothing on the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K

* FIX-2337: Teammates lab's message list and composer share one column

A --thread-width token (46rem) in the lab's theme caps both the message list
and the composer, centred, so their edges line up with Talk open or closed. The
composer's box starts at one line and grows with its text up to a cap. The
assistant's text takes the column's full width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi

* FIX-2338: new content in the Teammates lab settles in place

The conversation follows new content, a streamed answer's growth included,
only while the reader is at the end, scrolling the list itself and smoothly;
scrolled up, it stays put and offers Jump to latest. The answering line comes
from the conversation's items as well as the timed request list, and shows
only before an answer's text starts. A task card is drawn the moment it is
filed and fills in place when the board's row lands. Unchanged entries keep
their objects and Entry and TaskCard are memoized, so a chunk redraws only the
growing answer. A send's own stream now keeps tool results and components, so
a card lands in order beside the text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd

* FIX-2337: composer refits its height when the column's width changes

Talk toggling narrows or widens the center column, which rewraps a draft;
the box only refit on text changes. A ResizeObserver refits it on a width
change. Addresses Codex review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiE77dZBto1MJmMqd8e

* FIX-2338: reuse core's looseDeepEqual and keep a filed task's placeholder card stable

reuseById compares with looseDeepEqual from @flow-state-dev/core/helpers instead
of JSON.stringify. A task card drawn before its board row lands gets one
placeholder object per entry, so the memoized card skips re-renders while the
answer streams. Drops a duplicated doc comment on the task entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd

* FIX-2337: composer sizes to its draft with field-sizing-content

Matches the FSD prompt inputs (packages/ui, kitchen-sink) and drops the
scrollHeight effect and ResizeObserver: the browser regrows the box when
Talk narrows the column. Follows the Cursor review on Codex's resize finding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiE77dZBto1MJmMqd8e

* FIX-2338: a failed turn's half-written answer no longer reads as answering

The conversation's poll reads recent requests instead of only in-progress
ones, and answeringOf takes the ended request ids: the newest request's
in-progress item counts only while its record hasn't ended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd

* FIX-2337: refresh the lab inventory table after the merge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiE77dZBto1MJmMqd8e

* Claude Code-style lab: regenerate the README inventory main left stale

#4183 (FIX-2288) changed the lab's files without rewriting the table, so the
lab's inventory test is red on main and on every PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGfGi2RaecD1vUwy8K
(cherry picked from commit 091232e)

* test(workforce): bound the dead host's drain in the call crash tests (port of #4204)

Ported from #4204 so this PR's CI isn't red on main's worker-calls hook
timeout; it no-ops once main carries the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd

* Teammates lab: regenerate the README inventory after the merge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd

* FIX-2338: a finished answer doesn't end its request

One request can answer more than once (a worker draining its own plan
answers, works, and answers again), so answeringOf no longer treats a
completed assistant message as the request's end; only the request list
does. The conversation shows its 'answering' line only until the turn's
answer text starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGd2GcnfH9FbHkXisd

---------

Co-authored-by: Claude <noreply@anthropic.com>
jhoffner added a commit that referenced this pull request Oct 29, 2026
* spec(FIX-2334): workers know their own name and role

The identity block and a short tool-use rule become Workforce's default
prompt layer, first in the built-in worker flow's prompt, built from the
roster each turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiFsTymVutTnxtzVCSQ

* spec(FIX-2334): fold fsd-architect's placement answer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiFsTymVutTnxtzVCSQ

* spec(FIX-2334): fold the simplify review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiFsTymVutTnxtzVCSQ

* chore: refresh the Claude Code-style lab's inventory table

Stale on main since #4183, which turns the lab's inventory test red on
every PR. Regenerated with node scripts/inventory.mjs --write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiFsTymVutTnxtzVCSQ

* test(workforce): port #4204's bounded shutdown drain for the call crash tests

The two worker-calls crash tests time out in their afterEach on main
(red since FIX-2269); this is #4204's one-file fix, ported so this PR's
CI can go green. It no-ops once main carries #4204.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiFsTymVutTnxtzVCSQ

* spec(FIX-2334): the build removes the Teammates lab's stopgap identity lines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiFsTymVutTnxtzVCSQ

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants