Skip to content

FIX-2342: Cursor is the Teammates lab's default coding agent - #4226

Merged
jhoffner merged 1 commit into
mainfrom
claude/project-thread-mbvhei
Oct 30, 2026
Merged

jhoffner merged 1 commit into
mainfrom
claude/project-thread-mbvhei

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Jake · project thread

Follow-up to #4222 (FIX-2342, merged), from the product lead's review on agent-mailbox #46.

Depends on FIX-2344 (#4227). Merge #4227 first. Cursor fails with ENAMETOOLONG under the lab's default runs folder. Until #4227 lands, a coding task that names no agent fails on a real machine unless runsRoot is short. Merging this first makes the out-of-the-box path fail.

Known red, not this PR's: Test (3/3) fails on labs/claude-code-style test/inventory.test.ts, and it fails on main too since #4200. #4127 fixes it by dropping that lab's table check.

What changes

  • Cursor is the default coding agent (Jake's call). With no agent named, Chief of Staff assigns the coding task to teammates.cursor (chief-of-staff/WORKER.md). The host's fallback harness (TEAMMATES_HARNESS, for a coding worker whose file names none) is now cursor too, and so is the README.
  • The goal still proves a real Claude Code run. Step 5 of a-worker-talks-to-another-while-you-talk now asks "Have Claude Code fix…", so it runs on Claude Code by name rather than relying on the default.
  • Coding agents off the teammate surfaces: already true on main, no change needed. I checked each place:
    • Teammates list: App.tsx passes only !takesTasks workers to WorkersList, so the coding agents get no row, icon or status line. The screen tests assert none of the three has a data-worker row.
    • Roster a teammate can message: the coding flow's message entry hears task-sessions only, so workforce's recipientRefusal refuses them by name (task_sessions_only) and leaves them off the sendMessage tool's "Workers you can message" list.
    • Task lines and popups: a coding task's card draws no avatar, only the "Coding task: …, on " line.

Verification

  • labs/teammates vitest 62/62 and typecheck pass; the screen file passed 3 runs in a row; check-retired-terms passes.
  • Red state: with the fixture's default put back to Claude Code, 4 screen tests fail.
  • Not checked: real Claude Code, Codex or Cursor runs. Jake still needs to see real Claude Code and Codex runs on a signed-in machine.

No changeset: the lab is private.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NczDiEeU2NQEBYRRxCJf5b

Jake's call: with no agent named, Chief of Staff assigns a coding task to
teammates.cursor. The host's fallback harness and the README follow. The
goal's step 5 names Claude Code, so it keeps proving a real Claude Code run
while Cursor waits on FIX-2344.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiEeU2NQEBYRRxCJf5b
@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 12:25am UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 30, 2026 12:25am UTC
flow-state-dev-ui Ignored Ignored Oct 30, 2026 12:25am UTC

Request Review

@linear-code

linear-code Bot commented Oct 30, 2026

Copy link
Copy Markdown

FIX-2342

@jhoffner jhoffner self-assigned this Oct 30, 2026
@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-30T00:27:09.698988Z fad77ca PR opened
ℹ️ 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

Verdict: the change is right-sized. Seven files, 22/22 lines, every one traces to "Cursor is the default". I don't see a leaner or better approach. Findings below, in priority order.

1. Merge-order hazard (blocking on process, not code)

The PR body says it: until FIX-2344 lands, a coding task that names no agent hits ENAMETOOLONG under the default runs folder. This PR makes that the out-of-the-box path. Suggest the merge be gated on FIX-2344 (mark the PR draft, or add the Linear blocked-by relation) so it can't be merged first by accident. Nothing in the diff enforces the ordering.

2. The default is stated in three places that can drift

The same decision now lives in:

  • chief-of-staff/WORKER.md (prompt: "assign it to teammates.cursor")
  • host.mts:230 (options.harness ?? "cursor") plus its doc comment
  • test/fake-lab.ts (DEFAULT_CODER)

Plus prose in README.md and goal.md. The WORKER.md and host.mts defaults are two different mechanisms (which assignee the lead picks vs. which harness a worker with no harness: runs on), so they can't be merged without a design change, and I would not do that in this PR. But the fake lab's DEFAULT_CODER is a hand-copied mirror of the WORKER.md prose. If someone flips only WORKER.md, the screen tests stay green and the fake lab silently stops matching the real lead. Low-cost option for a follow-up: a small test that parses the WORKER.md default assignee and asserts it equals DEFAULT_CODER. Not worth doing here.

3. Hidden coupling worth a note: host.mts default is mostly unreachable

Every coding worker's WORKER.md names its harness:, so defaultHarness only applies to a worker file that names none. Flipping it to cursor changes behavior for no shipped worker today. That's fine, but it means the PR's real behavior change is the single WORKER.md line, and nothing but the screen tests (against a fake) exercises it. The PR already says real runs are unchecked; I agree with leaving it, just noting the model-prompt line is the only thing that actually moves production behavior and it is unverified against a real model.

4. Goal edit is correct but loosens what the goal proves

Step 5 now says "Have Claude Code fix…", so the goal no longer exercises the default path at all. That's the right call while Cursor is blocked by FIX-2344, but there is now no goal that proves "name none → Cursor, no question". Once FIX-2344 lands, consider a step or a sibling goal for the no-agent-named path, so the lead's prompt line is covered by something other than the fake-lab screen test.

5. Nit: goal.md Model: line

"Cursor is the default agent, and needs FIX-2344 under the default runs folder" is a temporary caveat that will be stale the moment FIX-2344 merges. It's tracking-ID prose inside a goal file (BP-006 spirit). Suggest dropping the FIX reference and stating only the stable fact (step 5 names Claude Code), or removing the parenthetical when 2344 lands.

Architecture (improve-codebase-architecture)

No refactor opportunity this PR should take. The three-way duplication in #2 is the only thing I'd flag, and the fix would be a design change (single source for the default coder) larger than this PR's intent. Leave it.

No correctness problems found in the test edits: the reshuffled names/toHaveLength(3) flow still covers all three agents and the no-teammate-row assertion.


Generated by Claude Code

@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: fad77ca553

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

`teammates.claude-code` (Claude Code), `teammates.codex` (Codex) and `teammates.cursor` (Cursor).
When the user names one ("have Codex do it"), assign it to that one. When they name none, assign
it to `teammates.claude-code` and go ahead: never ask which. Tell the user you started a coding
it to `teammates.cursor` and go ahead: never ask which. Tell the user you started a coding

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Land the Cursor path fix before selecting it by default

With the standard lab configuration, an unnamed coding request now goes to Cursor, but labs/teammates/README.md:147–150 documents that Cursor fails with ENAMETOOLONG under the default runs folder. In the reviewed tree, fsdev.config.mts:33 still selects that folder, and the required FIX-2344 mitigation is absent. This turns an opt-in harness failure into a failure of ordinary coding requests. Land the path fix before switching the default, or include a Cursor-compatible workspace path in this change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. This is the dependency the PR body leads with: Cursor as the default is the product call, and the path fix is FIX-2344, which another thread is building in harness-manager or the cursor package. It has no PR yet. I'm keeping it out of this lab change because the fix belongs in the packages, so the order is FIX-2344 first, then this PR. I'll leave this thread open until FIX-2344 lands, then merge main in.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Test (3/3) fails in labs/claude-code-style on test/inventory.test.ts ("README.md's inventory is out of date"). That isn't caused by this PR, which doesn't touch that lab. node scripts/inventory.mjs fails the same way on main at 84204f0, because #4200 (FIX-2333) changed the lab's files without updating its README table. No fix PR exists yet. Two possible fixes: run node labs/claude-code-style/scripts/inventory.mjs --write, or drop that lab's table check the way #4176 did for Teammates, which fits the direction of removing the README stats. I'm not widening this PR to make that call. I've flagged it so main gets fixed, and I'll merge main in once it is.


Generated by Claude Code

@jhoffner
jhoffner merged commit ccb1c2f into main Oct 30, 2026
20 of 22 checks passed
@jhoffner
jhoffner deleted the claude/project-thread-mbvhei branch October 30, 2026 01: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