Skip to content

FIX-2288: the Claude Code-style lab shows each task's model, harness and tokens - #4183

Merged
jhoffner merged 3 commits into
mainfrom
claude/project-thread-c4h3k1
Oct 29, 2026
Merged

jhoffner merged 3 commits into
mainfrom
claude/project-thread-c4h3k1

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What

FIX-2288 (#4149) gave listTasks rows a spend field (taskSpendView). Its spec leaves the drawing to the lab's two modes (FIX-2153, FIX-2157). This PR adds it to both, and covers Jake's FIX-2287 part 3.

This also covers FIX-2324 and supersedes #4181. #4181 was a session-mode-only duplicate, and its wording is folded in here.

  • Adapter (src/adapter.ts): passes each row's spend through onto TaskRow.
    • The harness tag now uses the harness the run reported.
    • Until a run reports one, it uses the worker's harness setting, as ER-9 allows.
  • src/components/Spend.tsx (new): turns a row's spend into "model · 12.4k tokens", or "model · 10.1k in · 2.3k out" for the split view.
    • Tokens no run has reported yet read "no tokens reported yet", never 0.
    • A count still missing a source gets "(partial)".
    • A side of the split nobody reported reads "not reported".
    • Views with no harness tag (session-mode cards, the task sheet) name the harness first.
    • A task that never ran shows nothing. The lab sums nothing itself.
  • Where it shows:
    • Threads mode: the thread card and the board row show the total; the thread view shows the split.
    • Session mode: the task card shows the total; the Done row keeps the final total; the task sheet shows the split.
    • The live count updates through the existing board refresh, which keeps running while a task is open.
  • Goal (threads-mode-script): signal 6 also checks two more things.
    • The coding thread's row carries harness claude-code and a model.
    • The card shows that model with a token count.
  • README paragraph and inventory updated.

Evidence

  • Lab tests: 58/58 pass.
    • test/spend.test.ts covers the empty, unreported, partial, per-side, harness-named, summed, split and k/M cases.
    • The threads and session screen tests assert the model and tokens on the card, the Done row and the sheet.
    • Red check: with the spend line blanked, 3 screen tests fail.
  • Real-model threads-mode goal: PASS on attempt 1 (c2bc98e).
    • The coding card showed claude-sonnet-5 · 291.2k tokens, the model and count from its row's spend.
    • A row was added to goal.md.
    • The later wording commit changes no checked text.
  • Lab tsc, inventory, and check-retired-terms all pass.

No changeset: the lab and goals are private.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NczDiGf8XW5KXUhuTXYzh2

…and tokens

listTasks rows now carry `spend` (taskSpendView). The lab passes it through on
its task rows and draws it: the model and a token count on threads-mode cards,
board rows and the thread view, and on session-mode cards, done rows and the
task sheet; the sheet and thread view split input and output. A count no run
has reported reads "no tokens reported yet", never 0. The harness tag prefers
the harness the run reported, falling back to the worker's setting until then.

The threads-mode goal now checks the coding card shows the model and token
count its row carries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGf8XW5KXUhuTXYzh2
@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 8:57pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 29, 2026 8:57pm UTC
flow-state-dev-ui Ignored Ignored Preview Oct 29, 2026 8:57pm UTC

Request Review

@linear-code

linear-code Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

FIX-2288

FIX-2324

@jhoffner jhoffner self-assigned this Oct 29, 2026
@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-29T20:59:55.650775Z c01f68a 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.

Copy link
Copy Markdown
Collaborator Author

Second look + architecture pass

Overall: the approach is right. One pure formatter (spendLine), one Spend component, adapter passthrough, no lab-side aggregation of requests. The leaner alternatives (formatting inside each card, or adding a derived field to TaskRow) are worse. Nothing here earns a refactor, so I'm not proposing one. Findings below are small and ordered by weight.

1. Merge conflict (blocking merge). mergeable_state is dirty. Main has since touched labs/claude-code-style/README.md, fsdev.config.mts and workforce/teams/desk/workers/main/WORKER.md. The README inventory table (Files/Lines) is the likely collision, so re-run the inventory script after merging rather than hand-resolving the numbers.

2. Partial counts are shown as if complete (src/components/Spend.tsx, spendLine). taskSpendViewSchema.unreported is "some source in the count hasn't reported". spendLine only reads unreported when both token fields are null. If one source has reported and another hasn't, the card shows 12.4k tokens with no caveat, an undercount that reads as a total. The PR's own stated rule is "never imply a number you don't have". Options: suffix + / "so far" when unreported && tokens !== null, or at least add a test pinning the intended behaviour either way. There's no test for that combination today.

3. tokenCount rounding boundary. tokenCount(999_950) returns "1000.0k" (toFixed(1) rounds up past the < 1_000_000 branch). Cheap fix: compute Math.round(n / 100) / 10 first and switch to M when it reaches 1000. Also 12.0k prints as 12.0k, which is fine, but worth deciding deliberately. Add the 999_950 case to spend.test.ts.

4. Copy says the lab sums nothing, but the card adds input + output (spendLine, README paragraph, test header). It's trivial arithmetic, but the claim in README and the Spend.tsx header comment ("never summed here") is false as written. Either reword ("sums nothing across requests") or have taskSpendView expose totalTokens so the lab truly only formats. I'd reword; adding a field to the orchestration view for this isn't worth it.

5. Harness source now bypasses the coding-flow gate (adapter.ts, harnessOf call site). Before, harness was only set for assignees whose flow is CODING_FLOW, and that value also gates reviewOf (harness !== undefined && status === "completed"). Now any row whose spend.harness is non-null takes that path. That's likely fine today (only harness runs report it), but the two meanings, "is a coding thread" and "which harness ran", are now fused in one variable. If a non-coding worker ever reports a harness, reviewOf fires for it. Consider keeping the gate on harnessOf for review eligibility and using spend.harness only for the tag.

6. Goal check couples to UI copy (threads-mode-script/run.mts). The regex /\d(\.\d)?[kM]? tokens/ re-encodes the formatter's output. It breaks silently if tokenCount changes (e.g. fix #3). Importing spendLine and asserting card.text.includes(spendLine(row)) would keep the goal and the UI from drifting. It also drops the hand-built notes sum.

7. Nit. Spend sits inside Sheet's subtitle. Confirm it renders in a block context there, since the span is block and the subtitle slot may be a <p>. A <div>-free span is fine, but the screen test only checks the text.

Not recommending: moving Spend into a shared package or @flow-state-dev/ui. One consumer, lab-specific styling. Revisit when the Codex/Cursor labs need it.


Generated by Claude Code

From the duplicate session-mode change (#4181, FIX-2324): a count still
missing a source is marked partial, a side of the split nobody reported reads
"not reported", and session-mode cards and the task sheet, which have no
harness tag, name the harness first.

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

@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-2288 spend on task cards

Verdict: The shape of this change is right. Plumbing TaskSpendView from listTasks, resolving harness once in boardOf, and a single Spend module used from the card/row/sheet/thread surfaces is simpler than the alternatives I checked (per-site formatting, pulling DevTool internals, or pushing display strings into orchestration). ~150 lines across 14 files is proportionate to “show model + tokens everywhere tasks appear.” I ran pnpm test in labs/claude-code-style — 56/56 passed.

Was the approach heavier than necessary?

Mostly no. Five <Spend task={…} /> call sites looks repetitive, but it is the same component with one optional split flag; inlining spendLine five times would be worse. The new spend.test.ts plus screen assertions match how this lab already tests presentation (fake-lab + RTL).

A smaller UX scope (only thread cards, not session-mode done rows / board list rows) would shrink the diff but would not match the goal script and README, which expect spend on coding cards in threads mode and split detail in sheets.

What I would not do instead:

  • Reuse formatTokenCount from DevTool — not on the public ./react surface, and rounding differs (12.4k vs integer k from 10k). Your tests and goal regex encode the lab rules.
  • Add formatTaskSpendView in orchestration — correct that data stays in orchestration; strings belong in UI. Shift-manager Usage uses different copy (tokens not reported vs no tokens reported yet). A shared formatter only pays off when a second consumer lands (not blocking here).

Optional cleanups (nice-to-have, not merge blockers)

  1. Trim repeated prose — the “read from row spend, never sum, unreported ≠ 0” invariant appears in Spend.tsx, adapter field docs, README, goal text, and several test comments. One canonical place (module header or README) would shorten the diff mentally.
  2. Spend props — spendLine / <Spend /> only need TaskSpendView | undefined, not full TaskRow (minor typing clarity).
  3. Split-mode null tokens — in the split branch, ?? 0 could show 0 in if the view ever had one side null without unreported; taskSpendView normally sets both or neither. If you want belt-and-suspenders alignment with “never imply zero spend,” treat partial null like the all-null path (uncertain this can happen in production).
  4. Goal script signal 6 — extra board(..., listTasks_tasks) after the card snapshot is clear but duplicates work if an earlier step already had the row; only worth deduping if the script already holds coding.id’s row elsewhere in that attempt.
  5. data-spend — useful for screen tests; fine to keep. If you prefer zero test-only attributes in shipped UI, assert live vs final via fixture timing + copy only.

Out of scope (pre-existing, not introduced here)

Threads layout still runs two watchTasks polls (board + center thread), so live spend updates double boardOf traffic. Worth a follow-up, not a reason to rework this PR.

Skipped recommendations

  • Exporting tokenCount only for unit tests — taste; current split is fine.
  • SpendSplit wrapper vs split boolean — no meaningful simplification.
  • Fixing all adapter as any[] typing — wider pass.

Approval: Direction and implementation look good; optional items above are polish, not a different architecture.

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

Comment thread labs/claude-code-style/src/adapter.ts Resolved

@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 — already tight. No POC.

Head c2bc98e36d56e20272ede44398dc7a6abc797326.

Read labs/claude-code-style/src/components/Spend.tsx, the tasksOf spread and harness fallback in adapter.ts, the six <Spend> sites (TaskCard, TaskDoneRow, TasksPane, ThreadCard, ThreadView, ThreadsBoard), test/spend.test.ts, spent() in test/fake-lab.ts, and tokensLabel in packages/shift-manager/src/lib/usage.ts.

A rewrite would not shrink this contract:

  • Six sites share one span. Inlining the line is longer.
  • tokenCount is this card's rounding (980, 12.4k, from 1k). tokensLabel is a different string (12.5 K tokens, from 10k).
  • spendLine is what the unit test calls for an empty row, "no tokens reported yet", and the k/M cases. Those branches stay either way.
  • spent() is the fixture object five scripts would otherwise write out.
  • The spend spread matches the other optional fields on that map.
  • className is the done row (shrink-0) and the thread view (px-4).

Do not open a follow-up for this.

Open in Web View Automation 

Sent by Cursor Automation: Code Snob

@jhoffner
jhoffner merged commit df92436 into main Oct 29, 2026
10 of 13 checks passed
@jhoffner
jhoffner deleted the claude/project-thread-c4h3k1 branch October 29, 2026 20:57
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
…ab 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
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
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
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
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
#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
jhoffner pushed a commit that referenced this pull request Oct 29, 2026
#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)
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 added a commit that referenced this pull request Oct 29, 2026
…sh tests (FIX-2269) (#4204)

* FIX-2269: continue a wait that dies after starting its work, before it 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

* FIX-2269: keep parkOwedEntry module-private (fallow: unused export)

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

* FIX-2269: fence a stop against the owed-park continuation; leave the 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

* FIX-2269: read the owe before the logged gate when classifying a request

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

* FIX-2269: a repeated send pays its message budget once

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

* FIX-2269: pay the owed park only once its gate is logged

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

* FIX-2269: keep the owed park while another wait in the request still 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

* FIX-2269: integration scenario for a wait killed before it parks

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

* FIX-2269: document owed parks in the execution architecture doc

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

* 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): bound the drain in a suite afterEach instead of a host 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

* chore(claude-code-style): regenerate the lab inventory table

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

---------

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants