Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"researcher": "teammates.researcher",
"ask": "Ask researcher for our launch date, and help me outline the post.",
"second": "Make section 2 about pricing.",
"fix": "Fix the typo in the README's first line.",
"fix": "Have Claude Code fix the typo in the README's first line.",
"remember": "By the way, the draft of the launch post is filed under the codename \"{code}\". Nothing to do about it, just say OK.",
"recall": "What codename did I give the launch post, and what is our launch date? Answer from what you already know, without asking anyone.",
"codename": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
- **2:** a line *Messaged researcher* in Chief of Staff's conversation, a line *From Chief of Staff* in researcher's, the exchange under *with researcher* in Chief of Staff's Talk panel, and a delivered row Chief of Staff → researcher in the message log.
- **3:** your second line goes in before researcher's reply has landed. The reply shows in Chief of Staff's conversation under researcher's name, after Chief of Staff's answer to you, carrying the date; Chief of Staff's message asked for a reply (`replyRequested`), and the log holds the answer as a delivered reply; a line of Chief of Staff's after it states the date.
- **4:** you tell Chief of Staff a codename, then send 60 more lines, past the 50-turn history window, each answered before the next. Then you ask for the codename and the launch date. Chief of Staff's answer holds all three words of the codename and the date, and Chief of Staff sent researcher nothing new for it (no new line, no new log row). The conversation shows a divider labelled *Earlier turns summarized*, and both the codename line and researcher's reply are drawn above it.
- **5:** you ask for the fix. Chief of Staff starts a coding task with no question: no card asks where, and no project shows anywhere on the page, nor in any worker's line. The coding task's run ends *done*, its steps, opened in a popup from its line, show Claude Code, and the result lands in Chief of Staff's conversation as the coding task's. On disk: the working folder's HEAD and working tree are untouched, and exactly one worktree of it, under the lab's runs folder, carries a commit that changes README.md alone, fixing its first line and nothing else.
- **5:** you ask for the fix, on Claude Code by name. Chief of Staff starts a coding task with no question: no card asks where, and no project shows anywhere on the page, nor in any worker's line. The coding task's run ends *done*, its steps, opened in a popup from its line, show Claude Code, and the result lands in Chief of Staff's conversation as the coding task's. On disk: the working folder's HEAD and working tree are untouched, and exactly one worktree of it, under the lab's runs folder, carries a commit that changes README.md alone, fixing its first line and nothing else.
**Anti-game:** Graded on what the browser shows, the message log read through the public client, and git. Never on the lab's adapter or the server's own state. Chief of Staff can't state the launch date without the reply, because it is drawn per run. The disk check reads git, so a run that only says it fixed the typo fails. The step-3 order check reads entry order as drawn, so a reply drawn before Chief of Staff's answer fails. Step 4 counts Chief of Staff's messages to researcher around the question, so asking researcher again for the date fails, and it reads which side of the divider each fact sits on, so a fact still read word for word doesn't count. Each graded list is floored with `tell.over`; an empty log or no worktree counts only where a control produces it, and says so.
**Model:** real — openai/gpt-5.4-mini (Chief of Staff, researcher, writer); the coding task's run on Claude Code, the default coding agent
**Model:** real — openai/gpt-5.4-mini (Chief of Staff, researcher, writer); the coding task's run on Claude Code, which step 5's line names (Cursor is the default agent, and needs FIX-2344 under the default runs folder)
**Run:** `pnpm tsx goals/teammates-lab/a-worker-talks-to-another-while-you-talk/run.mts` (needs `AI_GATEWAY_API_KEY`, and Claude Code signed in or `ANTHROPIC_API_KEY`)
**Controls:** each on the same command, failing the steps named and no other:
- `GOAL_CONTROL=no-model`: the workers answer on a model that doesn't exist. Steps 1, 2, 3 and 5 FAIL.
Expand Down
6 changes: 3 additions & 3 deletions labs/teammates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Every result lands back in Chief of Staff's conversation.
A code change is a coding task, not a teammate's job. Coding runs in the background, the way a
coding agent's job does: you watch it, you don't talk to it. Ask Chief of Staff for a code change
and Chief of Staff starts a coding task in the working folder, on one of three coding agents:
Claude Code, Codex or Cursor. Name one ("have Codex do it") and that one runs; name none and Claude
Code does, with no question first. Each agent is a worker of its own, off the list and never
Claude Code, Codex or Cursor. Name one ("have Codex do it") and that one runs; name none and Cursor
does, with no question first. Each agent is a worker of its own, off the list and never
messaged, whose `WORKER.md` names its `harness:`. A line in Chief of Staff's conversation and an
item under *Background* show the task, tagged with the agent it runs on (and the model, once the
run reports one), and open its run in a popup. The result lands in Chief of Staff's conversation as
Expand Down Expand Up @@ -85,7 +85,7 @@ This builds the pages and serves them with the lab's server (`fsdev.config.mts`)
|---|---|---|
| `TEAMMATES_MODEL` | the model Chief of Staff, researcher and writer answer on | `openai/gpt-5.4-mini` |
| `TEAMMATES_WORKDIR` | the working folder: an absolute path to a git checkout on this machine | the root of this repository |
| `TEAMMATES_HARNESS` | the harness a coding worker whose file names none runs on: `claude-code`, `codex` or `cursor` | `claude-code` |
| `TEAMMATES_HARNESS` | the harness a coding worker whose file names none runs on: `claude-code`, `codex` or `cursor` | `cursor` |
| `TEAMMATES_STORE` | the SQLite file | `.fsdev/teammates.sqlite` here |
| `TEAMMATES_USER` | who the page acts as | `you` |
| `TEAMMATES_TREE` | the workers' tree | `workforce/` here |
Expand Down
4 changes: 2 additions & 2 deletions labs/teammates/host.mts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export interface TeammatesOptions {
tree?: string;
/** Wall-clock budget for one coding run. Defaults to 20 minutes. */
runTimeoutMs?: number;
/** The harness a coding worker runs on when its file names none. Defaults to `claude-code`. */
/** The harness a coding worker runs on when its file names none. Defaults to `cursor`. */
harness?: string;
}

Expand Down Expand Up @@ -227,7 +227,7 @@ export async function openTeammates(options: TeammatesOptions) {
},
[CODER_FLOW]: coderFlow({
harnesses: HARNESSES,
defaultHarness: options.harness ?? "claude-code",
defaultHarness: options.harness ?? "cursor",
ready: READY,
workspace,
runTimeoutMs: options.runTimeoutMs ?? 20 * 60_000,
Expand Down
2 changes: 1 addition & 1 deletion labs/teammates/test/fake-lab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const LEAD = "teammates.chief-of-staff";
const RESEARCHER = "teammates.researcher";
const WRITER = "teammates.writer";
/** The coding worker a task that names no harness goes to: Chief of Staff's default. */
const DEFAULT_CODER = "teammates.claude-code";
const DEFAULT_CODER = "teammates.cursor";

type Job = { kind: "user"; entryId: string; text: string } | { kind: "receive"; message: TalkRow } | { kind: "result"; task: BoardTask };

Expand Down
24 changes: 12 additions & 12 deletions labs/teammates/test/screen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ describe("the teammates screen", () => {
await tell("Chief of Staff", "Fix the typo in the README's first line.");

// Step 5: the task runs in the working folder straight away: nothing asks where.
const card = await within(conversation()).findByRole("button", { name: "Coding task: Fix the typo in the README's first line, on Claude Code" });
const card = await within(conversation()).findByRole("button", { name: "Coding task: Fix the typo in the README's first line, on Cursor" });
const tile = card.closest<HTMLElement>("[data-entry=task]")!;
expect(tile.querySelector("[data-task-status]")?.textContent).toBe("running");
// The lab has no projects: no select, no prompt, no card, and no word for one anywhere.
Expand All @@ -175,7 +175,7 @@ describe("the teammates screen", () => {

// The result lands as the coding task's, never a teammate's, and Chief of Staff's next line uses it.
expect(await within(conversation()).findByRole("region", { name: "From the coding task" }, { timeout: 2000 })).toBeTruthy();
expect(within(conversation()).queryByRole("region", { name: "From Claude Code" })).toBeNull();
expect(within(conversation()).queryByRole("region", { name: "From Cursor" })).toBeNull();
expect(tile.querySelector("[data-task-status]")?.textContent).toBe("done");
expect(await within(conversation()).findByText(/The coding task is done: "Fixed the typo in README.md, line 1\."/, {}, { timeout: 2000 })).toBeTruthy();
expect(document.body.textContent).not.toMatch(/project/i);
Expand All @@ -184,38 +184,38 @@ describe("the teammates screen", () => {
it("opens a coding task's run in a popup, read only, from its line in the thread or its background item", async () => {
render(<App adapter={fast()} />);
await tell("Chief of Staff", "Fix the typo in the README's first line.");
const card = await within(conversation()).findByRole("button", { name: "Coding task: Fix the typo in the README's first line, on Claude Code" });
const card = await within(conversation()).findByRole("button", { name: "Coding task: Fix the typo in the README's first line, on Cursor" });

// From the thread: the run fills in live, with no composer, and its result lands in it.
fireEvent.click(card);
let popup = await screen.findByRole("dialog", { name: "Coding task: Fix the typo in the README's first line" });
expect(within(popup).queryByRole("textbox")).toBeNull();
await waitFor(() => expect(popup.textContent).toMatch(/on Claude Code/), { timeout: 2000 });
await waitFor(() => expect(popup.textContent).toMatch(/on Cursor/), { timeout: 2000 });
await waitFor(() => expect(popup.textContent).toMatch(/Edited line 1/), { timeout: 2000 });
expect(await within(popup).findByRole("region", { name: "Result" }, { timeout: 2000 })).toBeTruthy();
fireEvent.click(within(popup).getByRole("button", { name: "Close" }));
expect(screen.queryByRole("dialog")).toBeNull();

// From the background list: the same popup, and the item says it's the one open. The conversation stays.
const item = within(background()).getByRole("button", { name: "Coding task: Fix the typo in the README's first line, on Claude Code" });
const item = within(background()).getByRole("button", { name: "Coding task: Fix the typo in the README's first line, on Cursor" });
fireEvent.click(item);
popup = await screen.findByRole("dialog", { name: "Coding task: Fix the typo in the README's first line" });
expect(item.getAttribute("aria-current")).toBe("true");
expect(conversation()).toBeTruthy();
expect(popup.textContent).toMatch(/Edited line 1/);
});

it("runs a coding task on the agent you name, and on Claude Code when you name none, and its line says which", async () => {
it("runs a coding task on the agent you name, and on Cursor when you name none, and its line says which", async () => {
// Slower than fast(): the line must be seen before the run reports its model, and fast() leaves that window under one poll.
render(<App adapter={fast({ speed: 0.3 })} />);
const line = () => entries("task").at(-1) as HTMLElement;
const on = () => line().querySelector("[data-harness]")?.textContent;

// No agent named: the default runs, with no question first. Claude Code reports no model, so none shows.
// No agent named: the default, Cursor, runs with no question first. Cursor reports no model, so none shows.
await tell("Chief of Staff", "Fix the typo in the README's first line.");
await waitFor(() => expect(on()).toBe("Claude Code"), { timeout: 2000 });
await waitFor(() => expect(on()).toBe("Cursor"), { timeout: 2000 });
await waitFor(() => expect(line().querySelector("[data-task-status]")?.textContent).toBe("done"), { timeout: 3000 });
expect(on()).toBe("Claude Code");
expect(on()).toBe("Cursor");

// Named: that one runs. Codex reports its model once its run starts, and only then is it shown.
await tell("Chief of Staff", "Have Codex fix the typo in the README's first line.");
Expand All @@ -230,9 +230,9 @@ describe("the teammates screen", () => {
fireEvent.keyDown(document, { key: "Escape" });

await waitFor(() => expect(line().querySelector("[data-task-status]")?.textContent).toBe("done"), { timeout: 3000 });
await tell("Chief of Staff", "Have Cursor fix the typo in the README's first line.");
await tell("Chief of Staff", "Have Claude Code fix the typo in the README's first line.");
await waitFor(() => expect(entries("task")).toHaveLength(3), { timeout: 3000 });
await waitFor(() => expect(on()).toBe("Cursor"), { timeout: 2000 });
await waitFor(() => expect(on()).toBe("Claude Code"), { timeout: 2000 });
// All three are tasks, never teammates.
for (const coder of ["Claude Code", "Codex", "Cursor"]) expect(workers().querySelector(`[data-worker="${coder}"]`), coder).toBeNull();
});
Expand Down Expand Up @@ -341,7 +341,7 @@ describe("the teammates screen", () => {
it("draws a task card the moment it is filed and fills it in place: the same card from filing to done", async () => {
render(<App adapter={fast()} />);
await tell("Chief of Staff", "Fix the typo in the README's first line.");
const card = (await within(conversation()).findByRole("button", { name: "Coding task: Fix the typo in the README's first line, on Claude Code" })).closest("[data-entry=task]")!;
const card = (await within(conversation()).findByRole("button", { name: "Coding task: Fix the typo in the README's first line, on Cursor" })).closest("[data-entry=task]")!;
await waitFor(() => expect(card.querySelector("[data-task-status]")?.textContent).toBe("done"), { timeout: 3000 });
expect(conversation().querySelector("[data-entry=task]")).toBe(card);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ goal that says the whole change, word for word, and nothing in `input`. Coding t
background in the team's working folder, on one of three coding agents, each its own assignee:
`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

task and on which agent, never that you asked someone. Hand a job that needs the working folder's
files read, or a piece of a bigger job, to the teammate who does it the same way
(`teammates.researcher` to look into something, `teammates.writer` to draft). A job in several parts
Expand Down
Loading