Skip to content

FIX-2343: a coding task's run reads as plain steps on every harness - #4232

Merged
jhoffner merged 6 commits into
mainfrom
claude/project-thread-hd2i3n
Oct 30, 2026
Merged

jhoffner merged 6 commits into
mainfrom
claude/project-thread-hd2i3n

Conversation

@jhoffner

Copy link
Copy Markdown
Collaborator

Requested by Jake · project thread

Closes FIX-2343 (under FIX-2152). Based on main.

What changes

  • A coding run reads as plain steps. The Teammates lab's task popup used to show each tool call as its bare name ("Bash", "Read", "Edit").
    • Now each step says what it did: what the call said it was doing ("Run the docs check"), else what it acted on ("Read …/src/session-feed.ts", "Edit README.md", or the command it ran, as code).
    • A step with neither says "Used ", never the bare name on its own.
    • A run of steps folds into one line ("Ran 3 commands and edited a file") that opens to each one.
    • What the agent wrote shows as text, as before.
  • The words come from the UI registry, not the lab. The lab installs the registry's tool-naming and tool-grouping into src/components/flow-state/, the way it already installs message-response. Nothing in the lab parses a harness's output.
  • The registry reads all three harnesses' tools the same.
    • Bash, Codex's command_execution and Cursor's shell are all "ran a command". Edit, edit and Codex's file_change are all "edited a file". Grep is "searched the code". Lookup ignores case, since Claude Code says Bash.
    • Codex's file_change is named by the files it touched.
    • A path keeps the file's own name when a long folder, such as a run's hashed worktree, is on it. Before, the name was cut off.
    • The copies in Kitchen Sink and Shift Manager are updated to stay byte-identical; the drift checks require it. A patch changeset covers Shift Manager, since its tool lines change words.
  • The result leads. A finished task's popup shows its result first, with the run under it.
  • A first signal at once. A coding task's popup says "Starting on Codex…" as soon as its row lands, before the run reports anything. Once the run reports, it says "Started on Codex".
  • No harness decoration from this machine's settings. The lab's Claude Code runs load only the working folder's settings and CLAUDE.md (settingSources: ["project"]). A user output style, such as Explanatory's "★ Insight" boxes, no longer comes through.
  • Fix: Cursor runs never said what they started on. The host named the Cursor block cursor, so the lab's harness line never matched it (FIX-2342). The block now keeps its own name, cursor-agent.
  • The Coding tasks page is gone. On main, a coding task opens only in its popup, from its line or its Background item (FIX-2339). No page lists every task.

Verification

  • labs/teammates vitest: 63/63 pass.
    • The fake run now reports items in each harness's own tool names and arguments. They are read by the adapter's real runSteps.
    • New screen test, once each on Claude Code, Codex and Cursor:
      • The popup says "Starting on X…" before the run reports.
      • Once done, the popup's order is result, harness, steps.
      • The narration shows as text.
      • The fold reads "Edited a file and ran a command" on all three and opens to each step.
      • No line is a bare tool name.
  • packages/ui vitest: 239/239 pass. New tests:
    • The three harnesses' tools read the same.
    • Codex file changes are named by their files.
    • A long worktree path keeps the file's name.
    • Three existing render tests change words from "Ran `shell` 2 times" to "Ran 2 commands".
  • Red states:
    • With the old popup, the new screen test fails ("Starting on Claude Code…" missing).
    • With bare names, it fails (· Edit, · Bash).
    • With the old registry grouping, 2 grouping tests fail.
  • Real items: a real Cursor run's stored items, read through runSteps, give:
    • Started on Cursor
    • Grep "keps"
    • Edit …/README.md
    • the git commands it ran
    • its closing line, as text
  • Other checks: lab typecheck, eslint and inventory pass, as do check-retired-terms, goals tsc, the lab's vite build, packages/ui typecheck, and the Kitchen Sink and ui registry drift tests. packages/shift-manager has 584 tests passing, with 1 failure that fails the same way on main (its built pages are missing in this checkout).
  • Not checked:
    • A live run on any harness after this change.
    • The real Claude Code and Codex tool names. They come from the harness packages' translators and from Kitchen Sink's existing words.
    • How it looks in a real browser.

Generated by Claude Code

The Teammates lab's task popup names each tool call in the UI registry's
words (tool-naming, tool-grouping), folds runs of steps into one line,
leads with the result, and says "Starting on <harness>" from filing.
The registry now reads Claude Code's, Codex's and Cursor's tools the
same and keeps a file's name under a long worktree path. Claude Code
runs stop loading this machine's user settings (output styles), and the
Cursor block keeps its own name, so its run says what it started on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
@jhoffner jhoffner self-assigned this Oct 30, 2026
@linear-code

linear-code Bot commented Oct 30, 2026

Copy link
Copy Markdown

FIX-2343

@vercel

vercel Bot commented Oct 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 Oct 30, 2026 11:09am UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 30, 2026 11:09am UTC
flow-state-dev-ui Ignored Ignored Preview Oct 30, 2026 11:09am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-30T11:11:46.177161Z 80bccd7 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

Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown
Collaborator Author

Second look + architecture pass (read-only; no edits made)

Verdict: the approach is right. Naming comes from the registry, the lab parses nothing harness-specific, and runSteps is a small, testable extraction. No leaner shape worth proposing. A few findings, in priority order:

1. Grep/Glob steps still lead with the bare tool name (small, in scope)

verbFor in tool-naming.ts title-cases the tool name, so a Grep step reads Grep "keps" and a Glob step Glob …. The PR's own real-items check lists Grep "keps" as the expected output. The fold line says "searched the code", but the step line under it says "Grep". That is the bare-name problem the PR sets out to remove. Add grep: "Search" and glob: "Find" to VERBS (next to ls/multiedit), plus a test. The fix lands in the registry, so all three copies change together.

2. composeToolGroupLabel(group.map((t) => t.tool ?? t.text)) (SessionPopup.tsx)

tool is always set for tool steps today, so the ?? t.text fallback is dead. If it ever fired, it would feed prose ("Read …/a.ts") into a name lookup and give "Ran Read …/a.ts". Either make tool required on tool-kind steps (a discriminated SessionStep), or drop the fallback. Optional.

3. SessionStep grows kind-specific optionals

to, tool, code and streaming now sit on one flat interface, each valid for only one kind. A discriminated union would remove the ?? "" and ?? t.text guards in the adapter and the popup. It is a refactor of existing code, so I'd only do it if you are already touching SessionStep. This PR is a reasonable moment, but it is not required.

4. Four byte-identical copies of tool-naming.ts and tool-grouping.ts

Registry, lab, Kitchen Sink and Shift Manager all carry a copy, kept in line by drift tests. That matches how message-response is already installed, so this PR follows convention and I'm not asking for a change. The cost shows up here: every registry edit (e.g. #1) is now four files. If a drift test currently fails with a bare diff, consider having it print the "re-run the installer" command. Out of scope for this PR.

5. Nits

  • toolStep: intent goes through toolIntent for Task/Agent too. Check that a sub-agent step shows its description, not "Used Task". The tests only cover Bash-family tools.
  • The "Not checked" list admits that real Claude Code/Codex tool names come from translators and Kitchen Sink's wording. A one-time look at the harness packages' translator tests for the exact emitted names (Bash vs bash, file_change.changes[].path) would close the biggest unverified claim.
  • Dropping settingSources to ["project"] is a behavior change for every lab Claude Code run, not just output styles (user-level permissions/hooks/MCP are skipped too). Probably intended; worth a one-line mention in the lab README next to the other change.

None of these block. #1 is the one I'd carry into this PR.


Generated by Claude Code

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f482234010

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .changeset/coding-harness-tool-words.md Resolved
…dead-code findings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGPxx9RA1XY7n7yd4v
The spec PR removed the README's inventory block, so the lab's inventory
test fails on main. Ported here to get this PR green; it no-ops once main
carries the same fix.

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

jhoffner commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Test (3/3) is red on labs/claude-code-style/test/inventory.test.ts, and the cause is outside this PR. Main fails the same way: #4198 removed that lab's README stats table, and removing those tables is intended. The fix is #4127, which drops the lab's table check and is waiting to merge. A restore I pushed in ca5bc3c was reverted in 4ec69e3. Expect this check to stay red until #4127 lands and this branch picks it up.


Generated by Claude Code

Jake is removing README stats tables on purpose; #4127 fixes main by
dropping the claude-code-style lab's table check instead.

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

Copy link
Copy Markdown
Collaborator Author

@claude resolve conflicts

Main now runs an unnamed coding task on Cursor, so the plain-steps test
names Claude Code for its Claude Code row.

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

Copy link
Copy Markdown
Collaborator Author

Conflicts resolved in 80bccd7, which merges main into this branch. The only conflict was in labs/teammates/test/screen.test.tsx. Main now runs a coding task on Cursor when no agent is named, so the plain-steps test now names Claude Code for its Claude Code row. Lab vitest passes 64/64 and packages/ui passes 239/239. Lab typecheck, inventory and fallow pass. The Claude Code-style inventory also passes now that main has the fix.


Generated by Claude Code

@jhoffner
jhoffner merged commit 5329a47 into main Oct 30, 2026
19 checks passed
@jhoffner
jhoffner deleted the claude/project-thread-hd2i3n branch October 30, 2026 11:26
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