Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

feat(threads): a bot opens a thread on another model, picks it from a short list, and gets its result back

aivsomkar263572cd8241
diff --git a/apps/docs/content/docs/features/chat-and-teams.mdx b/apps/docs/content/docs/features/chat-and-teams.mdx
index 92f8a82702..f120d87db5 100644
--- a/apps/docs/content/docs/features/chat-and-teams.mdx
+++ b/apps/docs/content/docs/features/chat-and-teams.mdx
@@ -108,6 +108,12 @@ Off a team, nothing changes: the @ list shows bots, and `@you` still means you.
Bots can hand work to other bots, in any department. Delegated runs carry explicit status back into the parent conversation, including completion, failure, and cancellation: you see a "Sent to Bolt" line where the work went out, and the answer when it comes back. A bot does not need to be in a group chat to get work from one: work for a bot that isn't in the chat goes to that bot directly, in a thread of its own, and the chat shows "Sent to Bolt directly: it isn't in this room." Nobody is added to the chat, so nobody new reads it.
+### A second opinion from another model
+
+A bot doesn't need a teammate to get work done on another model. It can open a thread of its own on any model you have connected, from another provider too, and have the result come back to it: for example three reviews of one change, each on a different model, with no review bots to set up. The bot reads the models it can use with `list_models` and opens each thread with `start_thread`, a `model_selection` and `report_back`. `list_models` gives a short list per provider, with the model the bot is on first, and finds any other model by name, so a provider with hundreds of models doesn't flood the conversation. You see "Opened thread #Review: GPT" where it went out and "#Review: GPT replied" when the answer comes back, and the bot then carries on with every result in hand. The thread is a row under the bot like any other, so you can open it and read the whole review.
+
+A provider that is signed out or unavailable shows in `list_models` with the reason, and a thread on it is refused when it is opened, so a second opinion never quietly comes from the bot's own model. These threads can't be opened from a group chat, and a thread opened this way can't open more of its own.
+
### Creating a specialist with a chosen model
A Chief also adds a specialist on its own when a job needs one: an ongoing area of work, a different skill set, or work to run in parallel. The bot is created at once, the Chief tells you in one line, and the change has an **Undo**. When what you want matches a ready-made team in the library, the Chief reads its roles with `list_team_library` and creates them the same way.
diff --git a/docs/runtime-contract.md b/docs/runtime-contract.md
index 8e5a6db7db..c2ae842fef 100644
--- a/docs/runtime-contract.md
+++ b/docs/runtime-contract.md
@@ -33,7 +33,7 @@ queued ──admit──> running ──turn ends──> completed | failed | ca
(or, at Full access, its requester) └──wait expires (only a host's finite inputWaitMs)──> failed(expired)
```
-- **Enqueue** checks the parent is running (or there is no parent), refuses work back to an ancestor, dedupes (same brief, same assignee, same parent, unless `rework`), checks depth and the root's budgets, computes the level, writes the row with event `enqueued`. Refusals return a typed reason; they never throw into a turn.
+- **Enqueue** checks the parent is running (or there is no parent), refuses work back to an ancestor (one exception, `ownThread` in `server/runtime/tree.ts`: a direct conversation may hand work to a new thread of its own bot, which `start_thread`'s `report_back` uses; only the requesting turn is passed over, never a conversation already in the chain, so that thread cannot open another of its own), dedupes (same brief, same assignee, same parent, unless `rework`), checks depth and the root's budgets, computes the level, writes the row with event `enqueued`. Refusals return a typed reason; they never throw into a turn.
- **Admission** is one rule for every path: the runtime asks the host `canStart`; the host answers from its slots (a sibling waiting on the person does not hold its sibling). Same-conversation turns never overlap. `validate` runs before every dispatch and again on every tick for every live row: access that closes while a teammate works ends that work `failed(refused)` with the reason, its words are dropped, and a report whose route no longer admits it is withheld from the requester's resume.
- **One answer to the same request.** When a requester's work starts, the coordinator looks for the same request to the same bot from another requester, asked earlier and still being answered when this one was asked, in another conversation and outside a room (rooms keep their own turn order). "The same" means the same mode, approval level and `doneWhen`, and the same words in the same order once case, punctuation and spacing are set aside, 40 characters or more (`server/same-request.ts`): requests that differ by any word are two requests, however alike they read, and an answer from before the request was asked is never reused. The host decides whether this requester may have that answer (`shareAnswer`, `server/host/share-answer.ts`): the same people see both requesters' conversations, as on any home of one person, and the bot works on both in the same folder (two conversations' own private folders count as one). Such a request runs no turn of its own: it waits for that answer, kept out of the stall window, completes with it ("Another teammate asked this a moment ago, so it was answered once, for both of you:"), and is reported to its own requester as usual; the host notes in its thread why it ran nothing (`joined`). If the first ends without an answer, the second runs its own turn. A request in other words is not caught by this.
- **A turn** is one `run` of the assignee. Its result is `completed`, `failed(outcome)`, `needs_input(question)` or `continue`. If it handed out work, the node goes to `waiting` instead; when every child has settled and been reported, it goes to `resume` and runs once more with the children's results.
@@ -123,7 +123,8 @@ Every turn that may hand work on, whatever started it, gets the same tools:
- `assignment_status(id?)`: read-only; one assignment's status, outcome and result, or everything this conversation still waits on. External runtimes long-poll it; it never blocks a bot.
- `raise_escalation(reason)` (only with `features.chiefEscalations` on): a bot parks itself on a gate only a person can lift and says so in one line; the Chief of Staff (or the person directly, `server/escalations.ts`) is told, the turn keeps running and the tool's answer says to end it and wait.
- `usage_limits` reads each AI account's percent used, reset time and when that was checked, read-only: no credential, address or account id, an `unknown` status for no data and `unsupported` for an AI that reports no limits. A turn sees only accounts its audience may read, and a guest-driven turn is refused.
-- `list_bots`, `start_thread` (on yourself), `list_threads`, `close_thread`, `post_to_room`, `list_rooms`, the Chief tools and `retry_thread` are unchanged.
+- `start_thread` (on yourself) takes an optional `model_selection` (ids from the read-only `list_models`) and `report_back`: with it the thread is an assignment of the bot's own, and its result resumes the opener like a teammate's.
+- `list_bots`, `list_threads`, `close_thread`, `post_to_room`, `list_rooms`, the Chief tools and `retry_thread` are unchanged.
Every turn of one conversation is listed the same tools, byte for byte, so the provider's cached prompt carries over from turn to turn; what a turn may not do it is told when it calls the tool. Only what is fixed for the conversation shapes the list: `select_computer` in a direct chat whose bot may pick where it works (`OMB_COMPUTER_SELECTION`: Works on is not Off and no team computer is its own), refused with the reason on any turn but a person's own message; no `show_widget`, `show_html` or wait tools in a room (`OMB_ROOM`), since a room refuses the first two and holds no wait; `wait_until`, `list_waits` and `cancel_wait` in every direct chat, with or without a wait (with none, the last two say there is nothing to list or cancel); the skill tools wherever skill authoring is on, refused in a room to every turn but the first answer to a person's message.
diff --git a/server/activity.ts b/server/activity.ts
index 720de80730..8d07962fd3 100644
--- a/server/activity.ts
+++ b/server/activity.ts
@@ -99,6 +99,7 @@ const TEAM_ACTION_KEYS: Record<string, string> = {
list_rooms: "activity.tool.team.listRooms",
list_shared_computers: "activity.tool.team.listSharedComputers",
list_team_library: "activity.tool.team.listTeamLibrary",
+ list_models: "activity.tool.team.listModels",
list_team_setup: "activity.tool.team.listTeamSetup",
list_threads: "activity.tool.team.listThreads",
list_trigger_events: "activity.tool.team.listTriggerEvents",
diff --git a/server/agent-tool-policy.test.ts b/server/agent-tool-policy.test.ts
index 3481a5ea5a..e84821cd74 100644
--- a/server/agent-tool-policy.test.ts
+++ b/server/agent-tool-policy.test.ts
@@ -6,6 +6,7 @@ describe("built-in agent tool read policy", () => {
expect([...READ_ONLY_AGENT_TOOL_NAMES]).toEqual([
"list_bots",
"list_team_setup",
+ "list_models",
"list_shared_computers",
"list_rooms",
"list_threads",
diff --git a/server/agent-tool-policy.ts b/server/agent-tool-policy.ts
index 8db8f57167..f70cba2cd6 100644
--- a/server/agent-tool-policy.ts
+++ b/server/agent-tool-policy.ts
@@ -3,6 +3,7 @@
export const READ_ONLY_AGENT_TOOL_NAMES: ReadonlySet<string> = new Set([
"list_bots",
"list_team_setup",
+ "list_models",
"list_shared_computers",
"list_rooms",
"list_threads",
diff --git a/server/coordinator.ts b/server/coordinator.ts
index 2f5fdac8d8..9070b79f0f 100644
--- a/server/coordinator.ts
+++ b/server/coordinator.ts
@@ -2,6 +2,7 @@ import { RuntimeCoordinator } from "./runtime-coordinator.ts";
import type { WorkOrigin } from "./peer-provenance.ts";
import type { LegacyThreadResolver } from "./runtime/import-legacy.ts";
import type { Answerer, Assignment, EnvelopeNames, Level, Limits, Mode, Origin, Outcome, Owner, Reply, Requester, StatusView, TurnEvidence } from "./runtime/types.ts";
+import type { ModelSelection } from "../shared/wire.ts";
/** One coordinate_bots call, as the internal route hands it to the server. */
export type CoordinateBotsCall = {
@@ -21,6 +22,8 @@ export type CoordinateBotsCall = {
projectId?: string;
/** The assignment whose question the message answers, instead of new work. */
answers?: string;
+ /** start_thread's report_back: the one target is the sender's own new thread, run on this model. */
+ ownThread?: { modelSelection?: ModelSelection; approvalMode?: "ask" };
};
export type { LegacyThreadResolver };
@@ -105,6 +108,8 @@ export interface HandoffOptions {
rework?: boolean;
requestBatchKey?: string;
doneWhen?: string;
+ /** The target is a new thread of the requester's own bot (start_thread with report_back). */
+ ownThread?: boolean;
}
export type RoomAddress = Pick<HandoffView, "groupId" | "threadId" | "botId">;
diff --git a/server/drivers/agents-call.ts b/server/drivers/agents-call.ts
index afa25636eb..27418c7ecf 100644
--- a/server/drivers/agents-call.ts
+++ b/server/drivers/agents-call.ts
@@ -464,13 +464,18 @@ export async function callTool(called: string, input: Json, context: ToolCallCon
if (folder) body.folder = folder;
if (args.model_selection !== undefined) {
const fields = jsonRecord(args.model_selection) ? args.model_selection : null;
- if (!fields || typeof fields.instanceId !== "string" || !fields.instanceId.trim() || typeof fields.model !== "string" || !fields.model.trim()) {
- return { text: "start_thread model_selection needs instanceId and model.", isError: true };
+ if (!fields || typeof fields.instanceId !== "string" || !fields.instanceId.trim() || typeof fields.model !== "string" || !fields.model.trim()
+ || (fields.effort !== undefined && (typeof fields.effort !== "string" || !fields.effort.trim()))) {
+ return { text: "start_thread model_selection needs instanceId and model, as list_models gives them, and effort only from that engine's efforts.", isError: true };
}
- body.modelSelection = { instanceId: fields.instanceId.trim(), model: fields.model.trim() };
+ body.modelSelection = { instanceId: fields.instanceId.trim(), model: fields.model.trim(), ...(typeof fields.effort === "string" ? { effort: fields.effort.trim() } : {}) };
}
+ if (args.report_back === true) body.reportBack = true;
const r = await api("/api/internal/threads", { method: "POST", body: JSON.stringify(body) });
if (r.error && r.state !== "failed") return { text: `Couldn't open that thread: ${String(r.error)}`, isError: true };
+ if (r.reportBack === true) {
+ return { text: `Opened thread #${String(r.title ?? title)} on yourself [thread id: ${String(r.threadId ?? "")}]. It starts when this turn ends, and its result comes back to this conversation and resumes you automatically (assignment id: ${String(r.requestId ?? "unknown")}). Mention it to the person as #${String(r.title ?? title)} and finish your turn; do not check or wait for it in this turn.` };
+ }
const receipt = r.self !== true && Array.isArray(r.receipts) && jsonRecord(r.receipts[0]) ? r.receipts[0] : undefined;
const threadTitle = String(r.title ?? receipt?.title ?? title);
const threadId = String(r.threadId ?? receipt?.threadId ?? "");
@@ -498,6 +503,12 @@ export async function callTool(called: string, input: Json, context: ToolCallCon
text: `${opened}${timing}${approval} Its result will be delivered to this conversation automatically (assignment id: ${assignmentId || "unknown"}). Acknowledge it, mention it to the person as #${threadTitle}, and finish your turn; do not check or wait for it in this turn.`,
};
}
+ if (name === "list_models") {
+ const search = typeof args.search === "string" ? args.search.trim() : "";
+ const r = await api(`/api/internal/models${search ? `?search=${encodeURIComponent(search)}` : ""}`);
+ if (r.error) return { text: `Couldn't list models: ${String(r.error)}`, isError: true };
+ return { text: JSON.stringify(r) };
+ }
if (name === "list_team_setup") {
return { text: JSON.stringify(await api("/api/internal/team-setup-catalog")) };
}
diff --git a/server/drivers/agents-catalog-goldens/bridged.profiles.json b/server/drivers/agents-catalog-goldens/bridged.profiles.json
index bdb42ee817..780528f6a7 100644
--- a/server/drivers/agents-catalog-goldens/bridged.profiles.json
+++ b/server/drivers/agents-catalog-goldens/bridged.profiles.json
@@ -1,7 +1,7 @@
{
"default": {
- "bytes": 17645,
- "sha256": "2fbe02b309cc140a36959571f1fec3a58179fbbc26361ffbb5a93da6c8ff868e",
+ "bytes": 17658,
+ "sha256": "9c55b7cf36c333c5c5eedebc032a4f7d1b66e8aa0696a9b476871096d9c1f2e6",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -22,8 +22,8 @@
]
},
"voice": {
- "bytes": 18426,
- "sha256": "e69a2f444dad1f4e0ed76ab47b8bccc45fe683f9a741518f66d97aa0f7e18575",
+ "bytes": 18439,
+ "sha256": "ab1ad05d945d5869e3f81815bd34faaf4c7b2704e84cc4409ef81e2e6b5b12b6",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -45,8 +45,8 @@
]
},
"shared": {
- "bytes": 17685,
- "sha256": "01de1e7ba6e5f783e4dbfb00d63323a05a9c92a7874b7665368ad539868b599b",
+ "bytes": 17698,
+ "sha256": "f18a7198d6439965ce17dabc1baacdbe7fff9b332dec1d6ce12547435f27e725",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -67,8 +67,8 @@
]
},
"shared+voice": {
- "bytes": 18466,
- "sha256": "f55d19b8065b54a1c281187d43bf89fd6381fdec566a5c1f5023240ad3b9766c",
+ "bytes": 18479,
+ "sha256": "b0d0d451b6cb370aa33be5369bec353b8ab79fa18cba39d8e21e6238014b4413",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -90,8 +90,8 @@
]
},
"skills": {
- "bytes": 17672,
- "sha256": "bd414114559470a16e6d453958e6d550641f42072435fa73654f3fecd3147d9e",
+ "bytes": 17685,
+ "sha256": "723445769f27654ffbe2eb35eee563ca9dbc43730657d3d5c6f30e3c5cb18d25",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -112,8 +112,8 @@
]
},
"skills+voice": {
- "bytes": 18453,
- "sha256": "82cd88d4b5f03307f44bdfcac934d64638ecb4d25295fed6d7b1296b24b3bfbb",
+ "bytes": 18466,
+ "sha256": "a93fe58533fc1bf1586c03830876171de48b02319d9e861d14e2140cb8bac4a9",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -135,8 +135,8 @@
]
},
"skills+shared": {
- "bytes": 17712,
- "sha256": "a27faab98b5f8a47abfa4aa3414a79a4cdb9f3dd339c98419603b8633eba637c",
+ "bytes": 17725,
+ "sha256": "77307d291e8684d424414103922f7c5acef79655ec06cd61e2613bc5d14ebd55",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -157,8 +157,8 @@
]
},
"skills+shared+voice": {
- "bytes": 18493,
- "sha256": "2a6e8c7660aec4c2ba4af213f6a3d0f4157db4510d5c242d39a661b52f2a8a11",
+ "bytes": 18506,
+ "sha256": "1b025dc1fe251b30ca2ef1fe30397d7472f28dc398aa41027cddd50bc21a408f",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -180,8 +180,8 @@
]
},
"non-chief": {
- "bytes": 17528,
- "sha256": "b876738e4cfe41c5c3dedfdf4d46ec5147c458de554afaed689c9486f289ba35",
+ "bytes": 17541,
+ "sha256": "d0d452c9250a3ed00ba252b32fb9d1fc09add613bb20e288475eb646da620d39",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -202,8 +202,8 @@
]
},
"voice+non-chief": {
- "bytes": 18309,
- "sha256": "d163200607e835111a9f2c8e533024072a18bcef83ca0397cd83487c0a09ba25",
+ "bytes": 18322,
+ "sha256": "f6bcfc5f1415e59cd8ab645512dee6a3b6f91dceff199bb183ff1c2e0d2cd85b",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -225,8 +225,8 @@
]
},
"shared+non-chief": {
- "bytes": 17568,
- "sha256": "5e1523dad12d78d9d790abe23adbe395c0fb46a636da3e4ad3fbe6f6f49ebbac",
+ "bytes": 17581,
+ "sha256": "4d4e5bf28132e0c3e14c67f710a106b1b4d15cf4fa8043cba533bce0d0cf5a15",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -247,8 +247,8 @@
]
},
"shared+voice+non-chief": {
- "bytes": 18349,
- "sha256": "5090b777e0c501615d5137a6e4c6f2c722243ec8eb9761dbc4c0801ac8e3ad20",
+ "bytes": 18362,
+ "sha256": "090c4ac4167f2957b0130fb219fc54c80ac7fec8ab197e7b2c603b6b20f1a54c",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -270,8 +270,8 @@
]
},
"skills+non-chief": {
- "bytes": 17555,
- "sha256": "ce446259013cc318f7f61343bca9b87d92f9d9f0d4a88a242c7e4dea80cd5c73",
+ "bytes": 17568,
+ "sha256": "de9ff26d987df26fa7ceab7a22c9d22882c6ea7c02e9e74ebf158c054859c713",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -292,8 +292,8 @@
]
},
"skills+voice+non-chief": {
- "bytes": 18336,
- "sha256": "52b48a7eb1578f64ed48a8c0ec0e4a4e988d2169dd62a0f454fedc34f9513d15",
+ "bytes": 18349,
+ "sha256": "07f42229b4f789d2e6b18786275cedf961725dd09e966984ae4e6d7abb053ff2",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -315,8 +315,8 @@
]
},
"skills+shared+non-chief": {
- "bytes": 17595,
- "sha256": "92c6dc71bb885e531697e48ace1be84cc1502539913dd481f984f6fa3fce8e38",
+ "bytes": 17608,
+ "sha256": "79c0a3d6ff95d902a8ff653cd500d692754750ddb5e59e0e4c60e6e512349c23",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -337,8 +337,8 @@
]
},
"skills+shared+voice+non-chief": {
- "bytes": 18376,
- "sha256": "82900315658b28668f66cc0fd60cb035e1222586b7c114985059ba6928aafeb6",
+ "bytes": 18389,
+ "sha256": "8b17ace55bc07bc2465c723f4a06a94d44405d03311f1a7bbc979062d810f398",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -360,8 +360,8 @@
]
},
"skills+shared+voice+cloud-home": {
- "bytes": 18509,
- "sha256": "70e5714d5211d048fd3f0c3f9bed0763610daed790bdfc820c219ae1d59b9fd9",
+ "bytes": 18522,
+ "sha256": "0f96c9a51ac6ec45bbe13f7eb385464d875c0e401a51ce8e9fe8cb1f3ffb3ddb",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -383,8 +383,8 @@
]
},
"skills+shared+voice+non-chief+cloud-home": {
- "bytes": 18392,
- "sha256": "aebb8bc66e4e4b4d67456ccd6634442f6ed037926669b6c232c251e823d4d839",
+ "bytes": 18405,
+ "sha256": "03a1e93435cc7532fe6652f7d7828044a5e77f157206e0e4226916bd0c3920a6",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -406,8 +406,8 @@
]
},
"skills+shared+voice+escalations": {
- "bytes": 18511,
- "sha256": "6a454692fa544ab7fcd95562372224f12226a1daad3707a7736110089fb5c8e9",
+ "bytes": 18524,
+ "sha256": "5f2318e9195505cf489b272022fc90ff7a507b26baecd4fb7aabf7cca698efe0",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -429,8 +429,8 @@
]
},
"skills+shared+voice+escalations+x": {
- "bytes": 18572,
- "sha256": "5fa4901bfe23955ac6ee0cce63ad27f2c83f005cf6c5763ab6058b7e97791332",
+ "bytes": 18585,
+ "sha256": "6d527bf7e09adbbd6c1ae59f67c1471e52c3e3f6b8956f5f8d34b7398a47507f",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -452,8 +452,8 @@
]
},
"skills+shared+voice+escalations+x+team": {
- "bytes": 18572,
- "sha256": "5fa4901bfe23955ac6ee0cce63ad27f2c83f005cf6c5763ab6058b7e97791332",
+ "bytes": 18585,
+ "sha256": "6d527bf7e09adbbd6c1ae59f67c1471e52c3e3f6b8956f5f8d34b7398a47507f",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -475,8 +475,8 @@
]
},
"skills+shared+voice+escalations+x+team+images": {
- "bytes": 18588,
- "sha256": "f38b2edaee35285c64a76ceb62f97abd1f4ee19e522ad5b9be4c360c779ebdde",
+ "bytes": 18601,
+ "sha256": "62f5d9084d604c7f94fa8e264066c0f5fdb8aa634e57bc78e03f989e867d143c",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -498,8 +498,8 @@
]
},
"default+legacy-switches": {
- "bytes": 17645,
- "sha256": "2fbe02b309cc140a36959571f1fec3a58179fbbc26361ffbb5a93da6c8ff868e",
+ "bytes": 17658,
+ "sha256": "9c55b7cf36c333c5c5eedebc032a4f7d1b66e8aa0696a9b476871096d9c1f2e6",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -520,8 +520,8 @@
]
},
"default+mausbot": {
- "bytes": 17697,
- "sha256": "f9228f83719e9e304ff0c64013494c6aea524d1ccebb2118fdde601d45becd89",
+ "bytes": 17710,
+ "sha256": "53e854ec209705be77b994d046756f75257742ed4ec78564dca4779892916707",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -542,8 +542,8 @@
]
},
"skills+shared+voice+mausbot": {
- "bytes": 18545,
- "sha256": "fe8f4ad46a8a0ff56de681137dcae6f851554da0b242bd660d5814e8ae22cd10",
+ "bytes": 18558,
+ "sha256": "deec0d6ac8ee20ca9e5e73c5ae0aca7c2f7f56bb33b9fe78ec929cade198a737",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -565,8 +565,8 @@
]
},
"default+no-computer-pick": {
- "bytes": 16433,
- "sha256": "21708436ff3f01218494aa8c1d27768bdb3419a08a545e0141888457a9b3ad02",
+ "bytes": 16446,
+ "sha256": "4704ce93e07a7d608a4e917ba6a7113abf7563dceed3f499c6a771c0eaf3ba6a",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -586,8 +586,8 @@
]
},
"default+room": {
- "bytes": 16396,
- "sha256": "d21e6a394354cec8c4f2570c8f986d4c29395b262c01f6cb1f269e1219a0c0d5",
+ "bytes": 16409,
+ "sha256": "0514c60d828b218c66cffc83c741e059ac4863acfdd5e45e05425f738efcfdfa",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -607,8 +607,8 @@
]
},
"non-chief+room": {
- "bytes": 16279,
- "sha256": "4bddde56e548a8fe91cc2da07a99b0560906fe5bdbf72408cbd91914602e58ef",
+ "bytes": 16292,
+ "sha256": "3c45b2d533a4b70dc6f4c1cb3fe72f183f369c6eb029f41fe2dafdcc2898de48",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -628,8 +628,8 @@
]
},
"default+images": {
- "bytes": 17661,
- "sha256": "a9ef6a3875b9873f924a1c398eeab12028eb324e2a0e6431bc3835b37867897b",
+ "bytes": 17674,
+ "sha256": "ce5777b7dc3848c0c2eae5e2a57468e8efcec637f00fc3793ced23c8a70de9b4",
"tools": [
"tool_result_read",
"list_room_targets",
diff --git a/server/drivers/agents-catalog-goldens/bridged.tools-list.json b/server/drivers/agents-catalog-goldens/bridged.tools-list.json
index 7e942ba27a..a6896856a9 100644
--- a/server/drivers/agents-catalog-goldens/bridged.tools-list.json
+++ b/server/drivers/agents-catalog-goldens/bridged.tools-list.json
@@ -413,7 +413,7 @@
},
{
"name": "find_tool",
- "description": "Find an OpenMausBot tool that is not in your tool list. Say what you want to do in a few words, or give the tool's name. Each match comes back with its description and exact input schema; run one with use_tool. Tools reached this way: list_shared_computers, shared_computer, assignment_status, raise_escalation, usage_limits, list_threads, close_thread, start_thread, vm_exec, show_widget, show_html, unpublish_page, create_bot, list_team_setup, list_team_library, propose_team_setup, propose_bot_deletion, manage_room, x_search, research_search, research_endpoint, research_call, decide, extract, generate_image, report_bug, retry_thread, memory_log, session_search, trigger_info, trigger, delete_trigger, wait_until, list_waits, cancel_wait, propose_profile, propose_model, propose_team_memory, skills_list, skill_manage, mcp_server.",
+ "description": "Find an OpenMausBot tool that is not in your tool list. Say what you want to do in a few words, or give the tool's name. Each match comes back with its description and exact input schema; run one with use_tool. Tools reached this way: list_shared_computers, shared_computer, assignment_status, raise_escalation, usage_limits, list_threads, close_thread, start_thread, list_models, vm_exec, show_widget, show_html, unpublish_page, create_bot, list_team_setup, list_team_library, propose_team_setup, propose_bot_deletion, manage_room, x_search, research_search, research_endpoint, research_call, decide, extract, generate_image, report_bug, retry_thread, memory_log, session_search, trigger_info, trigger, delete_trigger, wait_until, list_waits, cancel_wait, propose_profile, propose_model, propose_team_memory, skills_list, skill_manage, mcp_server.",
"inputSchema": {
"type": "object",
"additionalProperties": false,
diff --git a/server/drivers/agents-catalog-goldens/full.tools-list.json b/server/drivers/agents-catalog-goldens/full.tools-list.json
index eadcba1963..4872731033 100644
--- a/server/drivers/agents-catalog-goldens/full.tools-list.json
+++ b/server/drivers/agents-catalog-goldens/full.tools-list.json
@@ -330,7 +330,7 @@
},
{
"name": "start_thread",
- "description": "Open a separate job on yourself: one conversation with its own history and its own run, shown to the person as a row under you, without switching the person's selected conversation. Use it only when the user requests independent jobs (for example one review per pull request, \"review each pull request\" — one thread per pull request) instead of doing them inside this conversation. The title becomes the row's name, so make it short and specific, and write it as #Title when you mention it to the person; give complete instructions, since the run will not see this conversation. You can open at most five per turn; a self-opened job cannot open more jobs. This is not a teammate handoff: use coordinate_bots for teammates (thread \"new\" opens a fresh thread on them) and their automatic replies. If a call is refused, do not retry it: say what you still wanted opened.",
+ "description": "Open a separate job on yourself: one conversation with its own history and its own run, shown to the person as a row under you, without switching the person's selected conversation. Use it only when the user requests independent jobs (for example one review per pull request, \"review each pull request\" — one thread per pull request) instead of doing them inside this conversation, or a second opinion from another model (model_selection from list_models, report_back true). The title becomes the row's name, so make it short and specific, and write it as #Title when you mention it to the person; give complete instructions, since the run will not see this conversation. You can open at most five per turn; a self-opened job cannot open more jobs. This is not a teammate handoff: use coordinate_bots for teammates (thread \"new\" opens a fresh thread on them) and their automatic replies. If a call is refused, do not retry it: say what you still wanted opened.",
"inputSchema": {
"type": "object",
"additionalProperties": false,
@@ -356,13 +356,20 @@
},
"model": {
"type": "string"
+ },
+ "effort": {
+ "type": "string"
}
},
"required": [
"instanceId",
"model"
],
- "description": "Optional: an engine instance and model id you can already use, as in propose_model. Leave out for this conversation's model."
+ "description": "Optional: ids (and effort) exactly as list_models gives them. Default: this conversation's model."
+ },
+ "report_back": {
+ "type": "boolean",
+ "description": "True: its result resumes you here; end your turn. Not in a room."
}
},
"required": [
@@ -371,6 +378,26 @@
]
}
},
+ {
+ "name": "list_models",
+ "description": "The ids start_thread's model_selection takes, a short list per engine; current is yours. more counts what search finds. unusable says why not; unavailable engines can't run now. Copy ids exactly.",
+ "inputSchema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "search": {
+ "type": "string",
+ "description": "Words to match instead of the short list."
+ }
+ }
+ },
+ "annotations": {
+ "readOnlyHint": true,
+ "destructiveHint": false,
+ "idempotentHint": true,
+ "openWorldHint": false
+ }
+ },
{
"name": "vm_exec",
"description": "Run a shell command inside your own Local VM (as the desktop user, starting in /home/cua/workspace) and get its exit code, stdout and stderr back as text. Use this for all command-line work in the VM: pip install --user, running a script, generating or converting a file, checking that a file exists. Do not type commands into a terminal window and read screenshots: that is slow and unreliable. GUI programs you start appear on the VM desktop. For a long job raise timeout_seconds (default 60, at most 300). Only available while you have a Local VM desktop.",
diff --git a/server/drivers/agents-catalog-goldens/profiles.json b/server/drivers/agents-catalog-goldens/profiles.json
index 13bfb2a70c..0200eed7aa 100644
--- a/server/drivers/agents-catalog-goldens/profiles.json
+++ b/server/drivers/agents-catalog-goldens/profiles.json
@@ -1,7 +1,7 @@
{
"default": {
- "bytes": 59744,
- "sha256": "f800173ad146c80a1d1636f16c6c448c3f81f4494871c4a1e9a1d5cb931db029",
+ "bytes": 60451,
+ "sha256": "a755219b8d1d524cd659db6cc03600a6fbb668b0e0443c2301929913e25d7946",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -14,6 +14,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -51,8 +52,8 @@
]
},
"voice": {
- "bytes": 60525,
- "sha256": "3542a61d8a11af96f907b036bd811d82801cc5e42db9d6cf04a3de2ff6bac60c",
+ "bytes": 61232,
+ "sha256": "d92a3a95023d44e91329e8fac019f68bc1d9f7b817b5131a54b0b5c726395b76",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -65,6 +66,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -103,8 +105,8 @@
]
},
"shared": {
- "bytes": 62009,
- "sha256": "10a1329d86ca4b524455e8068ec26872a57da142fafb964724352529551c7b4d",
+ "bytes": 62716,
+ "sha256": "d48f37e14c7ce6bc0b641090bc816525e5b109c8f4edf835ce2339a4d645947a",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -119,6 +121,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -156,8 +159,8 @@
]
},
"shared+voice": {
- "bytes": 62790,
- "sha256": "6bee018e3b2650dd3ffbf75d9393be65937996c0faf3f565e0e5b048811c5c14",
+ "bytes": 63497,
+ "sha256": "7d5608fe3fa560634f589859ff44377ed3187a671d773e74303bf04499b2927d",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -172,6 +175,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -210,8 +214,8 @@
]
},
"skills": {
- "bytes": 62820,
- "sha256": "7b69149e5b321b5870029a05e31653dc2a06b49a6673dfb6d18682abc47478dd",
+ "bytes": 63527,
+ "sha256": "1c6b248c9df11a62a159c8d120a1f49d10434b7d1304cc4b317d3402a831e7a7",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -224,6 +228,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -263,8 +268,8 @@
]
},
"skills+voice": {
- "bytes": 63601,
- "sha256": "d68f569967495bc4615af034223fb3f35f1d66b29503d067abfba1d76119df55",
+ "bytes": 64308,
+ "sha256": "ceea67d6cc5bca9a22cd1e02682093b1ae3865b7b6f445595c538c2a5cb756af",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -277,6 +282,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -317,8 +323,8 @@
]
},
"skills+shared": {
- "bytes": 65085,
- "sha256": "18df446ea3730c5f83135a275914a054aea572ead40de091787cab93dd62a7c4",
+ "bytes": 65792,
+ "sha256": "76b8eaf4f985d1b2ef80172e010735eb639f02946b6d3998e0e649cf523a862f",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -333,6 +339,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -372,8 +379,8 @@
]
},
"skills+shared+voice": {
- "bytes": 65866,
- "sha256": "147e622071bdc3a6c6359c2f0867445a31f829a46be25d018a5abace20b06828",
+ "bytes": 66573,
+ "sha256": "d2465c73bd88798a6542726cac8c8a3da502176a0e6b3d62cbde86ef13b01aa2",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -388,6 +395,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -428,8 +436,8 @@
]
},
"non-chief": {
- "bytes": 50528,
- "sha256": "887988da88b0936067719aa829e21397158a00ab12c088537d98405e72f131c9",
+ "bytes": 51235,
+ "sha256": "fbb473968cf07bbba7b5e14a2dcc79984d87b06debd42ad00f8396071c23621f",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -442,6 +450,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -472,8 +481,8 @@
]
},
"voice+non-chief": {
- "bytes": 51309,
- "sha256": "3f4e9d8a5793f451cf271b71dbb2f232c03600111b5db26895f9b4250d621a95",
+ "bytes": 52016,
+ "sha256": "9b074775a054709726cd4491fc56fd48313bb4bd59768e64923806d4873cae1b",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -486,6 +495,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -517,8 +527,8 @@
]
},
"shared+non-chief": {
- "bytes": 52793,
- "sha256": "2a839a380601bb7c6a0958dce572806f0ebcbf62da4b0402b2d2ad5af4434bd2",
+ "bytes": 53500,
+ "sha256": "41c6d3027319626022bc5ccfd9d88fa6c8279d728ca47a90b4db97375f61c0cd",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -533,6 +543,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -563,8 +574,8 @@
]
},
"shared+voice+non-chief": {
- "bytes": 53574,
- "sha256": "c50347d301c3c725191e9528656cbf45b5ca45eababbadf280d784e97d94eb52",
+ "bytes": 54281,
+ "sha256": "cc5371b0f0c1418c405b3834aa17ea29d3b73c2abc4b9d3798458e2d9712a467",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -579,6 +590,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -610,8 +622,8 @@
]
},
"skills+non-chief": {
- "bytes": 53604,
- "sha256": "d01bbf71e160df9d831fdfb8cc895e23ffd450abcda860b229123b4c879c04ed",
+ "bytes": 54311,
+ "sha256": "0db8f298fde64518b557963703cf1ca1c66a006d28ac3e1f459cb6c33a5f1c0a",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -624,6 +636,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -656,8 +669,8 @@
]
},
"skills+voice+non-chief": {
- "bytes": 54385,
- "sha256": "2fd3de4a7a30bc49a75352bab2e65a4a6573edc66c3b6343237a7b62a6087222",
+ "bytes": 55092,
+ "sha256": "c4872f06c9fcb52f85ceed26a119e759e466ed87427f255055fb160361c3dd6b",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -670,6 +683,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -703,8 +717,8 @@
]
},
"skills+shared+non-chief": {
- "bytes": 55869,
- "sha256": "6742406ff4816bf241d69fe40009c2b3bfc79ce86181b61316628e4ff79f7f96",
+ "bytes": 56576,
+ "sha256": "6de00676ad753a17eab423e2721acd43982b210408b646a4f391f20b40f02924",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -719,6 +733,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -751,8 +766,8 @@
]
},
"skills+shared+voice+non-chief": {
- "bytes": 56650,
- "sha256": "cccb89a47ba0b2416aed9318eac7d13b9c9f28657674a42697d888ce3103e987",
+ "bytes": 57357,
+ "sha256": "0664285ed32b440d868abe9ab3e47ccb07913a6b2674652fa6cc76dd78ce26b6",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -767,6 +782,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -800,8 +816,8 @@
]
},
"skills+shared+voice+cloud-home": {
- "bytes": 65632,
- "sha256": "d6fc3ddd122067841110cddba5b0a97f091e90f32221187580888055b3c00abd",
+ "bytes": 66339,
+ "sha256": "fdc6d42b3d10d435d6967a73ce2a9bff69cba97300a97b13f273627a12aff9ca",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -816,6 +832,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"attach_file",
"show_widget",
"show_html",
@@ -856,8 +873,8 @@
]
},
"skills+shared+voice+non-chief+cloud-home": {
- "bytes": 56416,
- "sha256": "69e8e67096a525e1263b5342a673503228fd08a0e7e3e7233d136aec75a2e10a",
+ "bytes": 57123,
+ "sha256": "33feb07b4b014fbfbea4d0b47bb8842bf67f0f0ed20a485469d3d951afca0fc6",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -872,6 +889,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"attach_file",
"show_widget",
"show_html",
@@ -905,8 +923,8 @@
]
},
"skills+shared+voice+escalations": {
- "bytes": 66696,
- "sha256": "91c45b9cc2a7cfd4e6574b5b33d51062104cf4f0d84276c838cd36e7f7a2bda1",
+ "bytes": 67403,
+ "sha256": "da4142bf2f71654ff3a6da85b0db3be8b8868f9430d2e9ca4dc199765e1c89a9",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -922,6 +940,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -962,8 +981,8 @@
]
},
"skills+shared+voice+escalations+x": {
- "bytes": 70535,
- "sha256": "416c0514136afd8c8c272f3bdd0f714bfb6da36f5266f9da0db6de13e855dd42",
+ "bytes": 71242,
+ "sha256": "f00213c092cb96ce77f926a34dd46de4b25a21e0c192321f2032f55aaa75792a",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -979,6 +998,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1023,8 +1043,8 @@
]
},
"skills+shared+voice+escalations+x+team": {
- "bytes": 70535,
- "sha256": "416c0514136afd8c8c272f3bdd0f714bfb6da36f5266f9da0db6de13e855dd42",
+ "bytes": 71242,
+ "sha256": "f00213c092cb96ce77f926a34dd46de4b25a21e0c192321f2032f55aaa75792a",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1040,6 +1060,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1084,8 +1105,8 @@
]
},
"skills+shared+voice+escalations+x+team+images": {
- "bytes": 71308,
- "sha256": "7984d5e85a4d04792d6c3a5bdcee7bcff20f1e6cd6bd73acd71eca07b5792fda",
+ "bytes": 72015,
+ "sha256": "9bff6841fe121d7b4915ad52948c2f7ba4240748570d6ab1d7614426cdc04157",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1101,6 +1122,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1146,8 +1168,8 @@
]
},
"default+legacy-switches": {
- "bytes": 59744,
- "sha256": "f800173ad146c80a1d1636f16c6c448c3f81f4494871c4a1e9a1d5cb931db029",
+ "bytes": 60451,
+ "sha256": "a755219b8d1d524cd659db6cc03600a6fbb668b0e0443c2301929913e25d7946",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1160,6 +1182,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1197,8 +1220,8 @@
]
},
"default+mausbot": {
- "bytes": 60395,
- "sha256": "0678fd1ae34e3fb657597d7ab5d1c184cab5b691ef9878260a15cbef9e6a18f4",
+ "bytes": 61102,
+ "sha256": "b01d2e1f7eb9b7f4f292883b5513af256926ddfbc210c9d3ec579141c13fd14e",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1211,6 +1234,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1250,8 +1274,8 @@
]
},
"skills+shared+voice+mausbot": {
- "bytes": 66517,
- "sha256": "7bceadf0db2c942a948fce4ab5cde49de206e76e17466c1c08ea8e95b967e775",
+ "bytes": 67224,
+ "sha256": "9a7b8a63e05d087e6e7d7381c10746ec685c6dfa6af8608024b0aa029f7780b1",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1266,6 +1290,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1308,8 +1333,8 @@
]
},
"default+no-computer-pick": {
- "bytes": 58532,
- "sha256": "ad151fa18232a667bd7c45c70164e0414127454cf6b0ffbb46003b68c9f22797",
+ "bytes": 59239,
+ "sha256": "2c755e2e0753fb95d65bf53cbac8e50ea1aa02af1fbe9bad10a3917d6368e8e5",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1321,6 +1346,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1358,8 +1384,8 @@
]
},
"default+room": {
- "bytes": 56888,
- "sha256": "c6922408bf0e10230c20163ce6206e734693611e27e6280f148d950fb634bcd7",
+ "bytes": 57595,
+ "sha256": "aac3232a20a4b6ba99578c88a62489d45a57e2072727d53222627aa20c6c3852",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1371,6 +1397,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1405,8 +1432,8 @@
]
},
"non-chief+room": {
- "bytes": 47672,
- "sha256": "52e5cb6ffeb60b87c36c941b8cc273d9588f7f1d45efe7dae975c9b495a54a68",
+ "bytes": 48379,
+ "sha256": "bbfe406f7fc3fb6bcd8716df28f38d5b7c7f810164890d7f8017c6af7f153b9e",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1418,6 +1445,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -1445,8 +1473,8 @@
]
},
"default+images": {
- "bytes": 60517,
- "sha256": "4d141adc06a6d909349a57be5d04339f9dfef79c32abcfa6418209ce2b46f6a7",
+ "bytes": 61224,
+ "sha256": "b4dea3f124c229c7aeed1d7a58d144e1d4ae43ad5051167272dd2486d9c6da5f",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1459,6 +1487,7 @@
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
diff --git a/server/drivers/agents-catalog-wire.test.ts b/server/drivers/agents-catalog-wire.test.ts
index 75fdcffa9e..f608a9439a 100644
--- a/server/drivers/agents-catalog-wire.test.ts
+++ b/server/drivers/agents-catalog-wire.test.ts
@@ -83,35 +83,35 @@ const FULL = "skills+shared+voice+escalations+x+team+images";
/** Bytes when the budget was last set; a profile may move at most 2% either way (lower it to lock in a win). */
const BUDGET_BASELINE: Record<string, number> = {
- "default": 59416,
- "voice": 60259,
- "shared": 61743,
- "shared+voice": 62524,
- "skills": 62343,
- "skills+voice": 63124,
- "skills+shared": 64608,
- "skills+shared+voice": 65451,
- "non-chief": 49935,
- "voice+non-chief": 50716,
- "shared+non-chief": 52200,
- "shared+voice+non-chief": 52981,
- "skills+non-chief": 52754,
- "skills+voice+non-chief": 53908,
- "skills+shared+non-chief": 55212,
- "skills+shared+voice+non-chief": 56173,
- "skills+shared+voice+cloud-home": 64782,
- "skills+shared+voice+non-chief+cloud-home": 55566,
- "default+legacy-switches": 59416,
- "default+mausbot": 60129,
- "skills+shared+voice+mausbot": 66102,
- "skills+shared+voice+escalations": 66281,
- "skills+shared+voice+escalations+x": 70321,
- "skills+shared+voice+escalations+x+team": 69416,
- "default+no-computer-pick": 58204,
- "default+room": 56622,
- "non-chief+room": 47406,
- "skills+shared+voice+escalations+x+team+images": 70755,
- "default+images": 60113,
+ "default": 60451,
+ "voice": 61232,
+ "shared": 62716,
+ "shared+voice": 63497,
+ "skills": 63527,
+ "skills+voice": 64308,
+ "skills+shared": 65792,
+ "skills+shared+voice": 66573,
+ "non-chief": 51235,
+ "voice+non-chief": 52016,
+ "shared+non-chief": 53500,
+ "shared+voice+non-chief": 54281,
+ "skills+non-chief": 54311,
+ "skills+voice+non-chief": 55092,
+ "skills+shared+non-chief": 56576,
+ "skills+shared+voice+non-chief": 57357,
+ "skills+shared+voice+cloud-home": 66339,
+ "skills+shared+voice+non-chief+cloud-home": 57123,
+ "default+legacy-switches": 60451,
+ "default+mausbot": 61102,
+ "skills+shared+voice+mausbot": 67224,
+ "skills+shared+voice+escalations": 67403,
+ "skills+shared+voice+escalations+x": 71242,
+ "skills+shared+voice+escalations+x+team": 71242,
+ "default+no-computer-pick": 59239,
+ "default+room": 57595,
+ "non-chief+room": 48379,
+ "skills+shared+voice+escalations+x+team+images": 72015,
+ "default+images": 61224,
};
const RPC_PREFIX = '{"jsonrpc":"2.0","id":1,"result":';
diff --git a/server/drivers/agents-catalog.ts b/server/drivers/agents-catalog.ts
index e7e2479492..32b487af12 100644
--- a/server/drivers/agents-catalog.ts
+++ b/server/drivers/agents-catalog.ts
@@ -296,7 +296,7 @@ const TOOL_DEFINITIONS = [
{
name: "start_thread",
description:
- "Open a separate job on yourself: one conversation with its own history and its own run, shown to the person as a row under you, without switching the person's selected conversation. Use it only when the user requests independent jobs (for example one review per pull request, \"review each pull request\" — one thread per pull request) instead of doing them inside this conversation. The title becomes the row's name, so make it short and specific, and write it as #Title when you mention it to the person; give complete instructions, since the run will not see this conversation. You can open at most five per turn; a self-opened job cannot open more jobs. This is not a teammate handoff: use coordinate_bots for teammates (thread \"new\" opens a fresh thread on them) and their automatic replies. If a call is refused, do not retry it: say what you still wanted opened.",
+ "Open a separate job on yourself: one conversation with its own history and its own run, shown to the person as a row under you, without switching the person's selected conversation. Use it only when the user requests independent jobs (for example one review per pull request, \"review each pull request\" — one thread per pull request) instead of doing them inside this conversation, or a second opinion from another model (model_selection from list_models, report_back true). The title becomes the row's name, so make it short and specific, and write it as #Title when you mention it to the person; give complete instructions, since the run will not see this conversation. You can open at most five per turn; a self-opened job cannot open more jobs. This is not a teammate handoff: use coordinate_bots for teammates (thread \"new\" opens a fresh thread on them) and their automatic replies. If a call is refused, do not retry it: say what you still wanted opened.",
inputSchema: {
type: "object",
additionalProperties: false,
@@ -307,14 +307,24 @@ const TOOL_DEFINITIONS = [
model_selection: {
type: "object",
additionalProperties: false,
- properties: { instanceId: { type: "string", minLength: 1 }, model: { type: "string", minLength: 1 } },
+ properties: { instanceId: { type: "string", minLength: 1 }, model: { type: "string", minLength: 1 }, effort: { type: "string", minLength: 1 } },
required: ["instanceId", "model"],
- description: "Optional: an engine instance and model id you can already use, as in propose_model. Leave out for this conversation's model.",
+ description: "Optional: ids (and effort) exactly as list_models gives them. Default: this conversation's model.",
},
+ report_back: { type: "boolean", description: "True: its result resumes you here; end your turn. Not in a room." },
},
required: ["title", "message"],
},
},
+ {
+ name: "list_models",
+ description: "The ids start_thread's model_selection takes, a short list per engine; current is yours. more counts what search finds. unusable says why not; unavailable engines can't run now. Copy ids exactly.",
+ inputSchema: {
+ type: "object",
+ additionalProperties: false,
+ properties: { search: { type: "string", maxLength: 200, description: "Words to match instead of the short list." } },
+ },
+ },
{
name: "vm_exec",
description:
diff --git a/server/drivers/agents-proxy.test.ts b/server/drivers/agents-proxy.test.ts
index ef04979a76..7ef653d2bd 100644
--- a/server/drivers/agents-proxy.test.ts
+++ b/server/drivers/agents-proxy.test.ts
@@ -43,6 +43,7 @@ const DONE_ASSIGNMENT = {
children: [], inbox: [],
};
let lastAssignmentStatusUrl: string | null = null;
+let lastModelsUrl: string | undefined;
let assignmentStatusResponse: unknown = DONE_ASSIGNMENT;
let assignmentStatusCode = 200;
let lastThreadBody: any = null;
@@ -260,6 +261,12 @@ beforeAll(async () => {
res.end(JSON.stringify(assignmentStatusResponse));
return;
}
+ if (req.method === "GET" && req.url?.startsWith("/api/internal/models")) {
+ lastModelsUrl = req.url;
+ res.writeHead(200, { "content-type": "application/json" });
+ res.end(JSON.stringify({ current: { instanceId: "claude", model: "claude-sonnet-5" }, engines: [{ instanceId: "codex", name: "Codex", models: ["gpt-5.5"] }] }));
+ return;
+ }
if (req.method === "GET" && req.url?.startsWith("/api/internal/threads?")) {
res.writeHead(200, { "content-type": "application/json" });
res.end(JSON.stringify(threadsList));
@@ -640,6 +647,7 @@ describe("agents-proxy MCP surface", () => {
"list_threads",
"close_thread",
"start_thread",
+ "list_models",
"vm_exec",
"attach_file",
"show_widget",
@@ -758,7 +766,7 @@ describe("agents-proxy MCP surface", () => {
"tool_result_read",
"list_shared_computers",
"assignment_status", "list_bots", "usage_limits", "list_rooms", "list_threads",
- "list_team_setup",
+ "list_models", "list_team_setup",
"session_search", "trigger_info", "list_waits", "skills_list",
];
expect(list.result.tools.filter((tool: any) => tool.annotations?.readOnlyHint)
@@ -969,7 +977,7 @@ describe("agents-proxy MCP surface", () => {
const list = await rpc("tools/list");
const start = list.result.tools.find((tool: { name: string }) => tool.name === "start_thread");
expect(start.inputSchema.required).toEqual(["title", "message"]);
- expect(Object.keys(start.inputSchema.properties)).toEqual(["title", "message", "folder", "model_selection"]);
+ expect(Object.keys(start.inputSchema.properties)).toEqual(["title", "message", "folder", "model_selection", "report_back"]);
expect(start.description).toContain("Open a separate job on yourself");
expect(start.description).toContain('use coordinate_bots for teammates (thread "new" opens a fresh thread on them)');
expect(start.description).toContain("do not retry it");
@@ -996,6 +1004,34 @@ describe("agents-proxy MCP surface", () => {
}
});
+ it("list_models forwards search and hands back the server's menu as is", async () => {
+ const res = await callTool("list_models", { search: " gpt 5.5 " });
+ expect(res.result.isError).toBeFalsy();
+ expect(lastModelsUrl).toBe("/api/internal/models?search=gpt%205.5");
+ expect(JSON.parse(res.result.content[0].text)).toMatchObject({ engines: [{ instanceId: "codex", models: ["gpt-5.5"] }] });
+ await callTool("list_models", {});
+ expect(lastModelsUrl).toBe("/api/internal/models");
+ });
+
+ it("start_thread on another model forwards the model and report_back, and says the result resumes the opener", async () => {
+ const previous = threadResponse;
+ threadResponse = { receipts: [{ botId: "bot-asker", outcome: "queued", detail: "handed to the coordinator", requestId: "asg-own-1", threadId: "thread-own" }],
+ self: true, reportBack: true, title: "Review: GPT", botId: "bot-asker", threadId: "thread-own", requestId: "asg-own-1" };
+ try {
+ const modelSelection = { instanceId: "codex", model: "gpt-5.5", effort: "high" };
+ const res = await callTool("start_thread", { title: "Review: GPT", message: "Review the diff.", model_selection: modelSelection, report_back: true });
+ const text = res.result.content[0].text;
+ expect(res.result.isError).toBeFalsy();
+ expect(text).toContain("Opened thread #Review: GPT on yourself [thread id: thread-own].");
+ expect(text).toContain("its result comes back to this conversation and resumes you automatically (assignment id: asg-own-1)");
+ expect(text).toContain("finish your turn");
+ expect(lastThreadBody).toEqual({ fromBotId: "bot-asker", fromThreadId: "thread-asker-routine", title: "Review: GPT", message: "Review the diff.",
+ depth: 0, modelSelection, reportBack: true });
+ } finally {
+ threadResponse = previous;
+ }
+ });
+
it("start_thread on yourself forwards the sender and says whether it runs or waits in line", async () => {
threadResponse = { threadId: "thread-new", title: "QA: PR #1", botId: "bot-asker", botName: "Asker", self: true, state: "running", limit: 3 };
const running = await callTool("start_thread", { title: "QA: PR #1", message: "Review the login fix." });
diff --git a/server/host/handoff-sent.test.ts b/server/host/handoff-sent.test.ts
index b2d1673af9..514805744e 100644
--- a/server/host/handoff-sent.test.ts
+++ b/server/host/handoff-sent.test.ts
@@ -30,6 +30,12 @@ describe("sentRow", () => {
const direct = sentRow({ sender, recipient, threadId: "buyer-work", via: "direct" });
expect([direct.tool?.name, direct.threadRef?.title, direct.sentDirectly]).toEqual(["Sent to Buyer Research", "Teammate work", undefined]);
});
+
+ it("names a bot's own new thread by its title, linked like a teammate's", () => {
+ const own = sentRow({ sender, recipient: sender, threadId: "chief-review", title: "Review: GPT", via: "direct", doneWhen: "every finding has a line" });
+ expect(own).toMatchObject({ tool: { name: "Opened thread #Review: GPT", ok: true }, doneWhen: "every finding has a line",
+ threadRef: { botId: "chief", threadId: "chief-review", title: "Review: GPT" } });
+ });
});
describe("outsideRoomNote", () => {
diff --git a/server/host/handoff-sent.ts b/server/host/handoff-sent.ts
index fab7b4b6df..14a89d80d3 100644
--- a/server/host/handoff-sent.ts
+++ b/server/host/handoff-sent.ts
@@ -23,7 +23,8 @@ export function sentRow(input: { sender: Who; recipient: Who; threadId: string;
language?: string }): Omit<Message, "id" | "at"> {
const { sender, recipient, threadId, room, via, language } = input;
const outside = room && via === "direct" ? room : undefined;
- const name = outside ? outside.here ? serverLine(language, "server.teammates.sentDirectlyHere", { bot: recipient.name })
+ const name = sender.id === recipient.id ? serverLine(language, "server.rooms.openedThread", { title: input.title ?? "" })
+ : outside ? outside.here ? serverLine(language, "server.teammates.sentDirectlyHere", { bot: recipient.name })
: serverLine(language, "server.teammates.sentDirectly", { bot: recipient.name, room: outside.name })
: room && !room.here ? serverLine(language, "server.teammates.sentInRoom", { bot: recipient.name, room: room.name })
: serverLine(language, "server.teammates.sent", { bot: recipient.name });
diff --git a/server/host/own-threads.ts b/server/host/own-threads.ts
new file mode 100644
index 0000000000..3ce77d4adf
--- /dev/null
+++ b/server/host/own-threads.ts
@@ -0,0 +1,70 @@
+// A bot's own threads: list_models, start_thread and the thread's turn start share one check, so a model the list offers
+// always opens, and a second opinion never quietly comes from the opener's own model.
+import { approvalModeFor, modelSwitchNeedsAsk } from "../../shared/approval-mode.ts";
+import type { ModelSelection } from "../../shared/wire.ts";
+import { modelMenu, type MenuEngine, type ModelMenu } from "../routes/internal-models.ts";
+import type { BotRecord, Store } from "../store.ts";
+import type { ThreadModelFallback } from "../thread-model.ts";
+
+type Placed = { botId: string; threadId: string; groupId?: string };
+type Node = Omit<Placed, "threadId"> & { parentId?: string };
+
+export function createOwnThreads(deps: {
+ store: Pick<Store, "bot" | "taskByThread">;
+ registry: { instances(): readonly MenuEngine[]; cliTarget(instanceId: string): { driverKind: string } | null | undefined };
+ node(id: string): Node | undefined;
+ current(botId: string, threadId: string): ModelSelection | undefined;
+ /** propose_model's check: offered, not turned off by the organization, the bot's permissions carry over. */
+ proposalRefusal(selection: ModelSelection, bot: BotRecord): string | null;
+ /** Why turn start would run a thread chosen on `selection` on the bot's own model instead. */
+ givesWay(selection: ModelSelection, botModel: ModelSelection): ThreadModelFallback | null;
+ modelName(selection: ModelSelection): string;
+}) {
+ const { store } = deps;
+ const own = (requester: Omit<Placed, "threadId">, child: Omit<Placed, "threadId">) =>
+ requester.botId === child.botId && !requester.groupId && !child.groupId;
+ const cannotRun = (selection: ModelSelection, bot: BotRecord): string | null => {
+ const givesWay = deps.givesWay(selection, bot.modelSelection);
+ return givesWay && `${deps.modelName(selection)} can't run now: ${givesWay === "signed-out" ? "it is signed out" : "its engine is unavailable"}.`;
+ };
+ const refusal = (selection: ModelSelection, bot: BotRecord): string | null => deps.proposalRefusal(selection, bot) ?? cannotRun(selection, bot);
+ return {
+ own,
+ refusal,
+ /** A report-back thread whose model can no longer run fails with this reason instead of running on the bot's own model. */
+ swapRefusal(bot: BotRecord, threadId: string): string | null {
+ const chosen = store.taskByThread(bot.id, threadId)?.modelSelection;
+ const reason = chosen && cannotRun(chosen, bot);
+ return reason ? `${reason} Nothing ran on another model in its place; open it again on a model list_models offers.` : null;
+ },
+ /** `answers` names a question one of `botId`'s own threads waits on: the one message a bot may address to itself. */
+ answersOwn(answers: string | undefined, botId: string): boolean {
+ const asked = answers === undefined ? undefined : deps.node(answers);
+ const requester = asked?.parentId === undefined ? undefined : deps.node(asked.parentId);
+ return Boolean(asked && requester && requester.botId === botId && own(requester, asked));
+ },
+ inherited(botId: string, parentThreadId: string): { modelSelection?: ModelSelection; approvalMode?: "ask" } {
+ const bot = store.bot(botId);
+ const modelSelection = bot && store.taskByThread(bot.id, parentThreadId)?.modelSelection;
+ if (!bot || !modelSelection) return {};
+ const needsAsk = modelSwitchNeedsAsk(approvalModeFor(bot),
+ deps.registry.cliTarget(bot.modelSelection.instanceId)?.driverKind,
+ deps.registry.cliTarget(modelSelection.instanceId)?.driverKind);
+ return { modelSelection, ...(needsAsk ? { approvalMode: "ask" as const } : {}) };
+ },
+ name(requester: Omit<Placed, "threadId">, child: Placed): string | undefined {
+ return own(requester, child) ? `#${store.taskByThread(child.botId, child.threadId)?.title ?? "Thread"}` : undefined;
+ },
+ label(child: Placed): string {
+ const task = store.taskByThread(child.botId, child.threadId);
+ return ` (your thread #${task?.title ?? "Thread"}${task?.modelSelection ? `, on ${task.modelSelection.model}` : ""})`;
+ },
+ menu(botId: string, threadId: string, search: string | undefined): ModelMenu | null {
+ const bot = store.bot(botId);
+ if (!bot) return null;
+ const current = deps.current(botId, threadId) ?? bot.modelSelection;
+ return modelMenu({ engines: deps.registry.instances(), current, pinned: [bot.modelSelection], refusal: (selection) => refusal(selection, bot),
+ down: (engine) => deps.givesWay({ instanceId: engine.instanceId, model: engine.models.default }, bot.modelSelection) === "unavailable", search });
+ },
+ };
+}
diff --git a/server/host/room-access.test.ts b/server/host/room-access.test.ts
index 2b3c87a092..da6c61b2d3 100644
--- a/server/host/room-access.test.ts
+++ b/server/host/room-access.test.ts
@@ -115,3 +115,23 @@ describe("a room job in a thread of its own", () => {
expect(roomHandoffProblem({ botId: "e1", threadId: "lane" })).toMatch(/^The addressed agent is no longer a member of this room, so its room job stopped/);
});
});
+
+describe("roomHandoffProblem", () => {
+ const bots = {
+ coder: { id: "coder", name: "Coder", peers: ["tester"] },
+ tester: { id: "tester", name: "Tester" },
+ outsider: { id: "outsider", name: "Outsider" },
+ } as unknown as Record<string, BotRecord>;
+ const store = {
+ bot: (id: string) => bots[id],
+ taskByThread: (botId: string, threadId: string) => threadId.startsWith(botId) ? { threadId } : undefined,
+ } as unknown as Store;
+ const { roomHandoffProblem } = createRoomAccess({ store });
+ const from = { botId: "coder", threadId: "coder-chat" };
+
+ it("lets a bot reach its own thread whatever its teammate list, and keeps that list for every other bot", () => {
+ expect(roomHandoffProblem({ botId: "coder", threadId: "coder-review" }, from)).toBeUndefined();
+ expect(roomHandoffProblem({ botId: "tester", threadId: "tester-work" }, from)).toBeUndefined();
+ expect(roomHandoffProblem({ botId: "outsider", threadId: "outsider-work" }, from)).toMatch(/./);
+ });
+});
diff --git a/server/host/room-access.ts b/server/host/room-access.ts
index 04b65888c8..5fcdf8d740 100644
--- a/server/host/room-access.ts
+++ b/server/host/room-access.ts
@@ -51,7 +51,8 @@ export function createRoomAccess({ store, privateTo = () => null, lookedAfterBy
const source = parent.groupId ? store.group(parent.groupId) : undefined;
if (!from || from.hidden || (parent.groupId ? !source || !source.memberIds.includes(from.id) || !store.groupTaskByThread(source.id, parent.threadId) : !store.taskByThread(from.id, parent.threadId))) return "Source membership or task was removed";
if (source && group && source.id === group.id && parent.threadId !== node.threadId) return "Same-room work must stay in the originating conversation";
- if (!peerAllowed(from, bot)) return reachRefusal(from, bot, lookedAfterBy)!;
+ // A bot's own thread (start_thread's report_back) is no teammate: its teammate list never names itself.
+ if (!(from.id === bot.id && !node.groupId) && !peerAllowed(from, bot)) return reachRefusal(from, bot, lookedAfterBy)!;
}
}
diff --git a/server/index.ts b/server/index.ts
index d31c4871cc..c21dcc4cd1 100644
--- a/server/index.ts
+++ b/server/index.ts
@@ -602,7 +602,7 @@ import { createInternalThreadRoutes } from "./routes/internal-threads.ts";
import { createBrowserEvidenceRoutes } from "./routes/browser-evidence.ts";
import { createSignInCardRoutes } from "./routes/sign-in-cards.ts";
import { createInternalEscalateRoutes } from "./routes/internal-escalate.ts";
-import { createInternalChiefTeamRoutes } from "./routes/internal-chief-team.ts";
+import { createInternalChiefTeamRoutes } from "./routes/internal-chief-team.ts"; import { createInternalModelRoutes } from "./routes/internal-models.ts"; import { createOwnThreads } from "./host/own-threads.ts";
import { createRoomHoldRoutes } from "./routes/room-holds.ts";
import { checkedGroupResponder, createGroupRoutes } from "./routes/groups.ts";
import { createChannelRoutes } from "./routes/channels.ts";
@@ -1025,15 +1025,6 @@ function openerFrom(fromThreadId: string): string | undefined {
return person && !cloudOwnerPerson(person) ? person : CLOUD_NOBODY_KEY;
}
-function parentThreadModel(botId: string, parentThreadId: string): { modelSelection?: ModelSelection; approvalMode?: "ask" } {
- const bot = store.bot(botId);
- const modelSelection = bot && store.taskByThread(bot.id, parentThreadId)?.modelSelection;
- if (!bot || !modelSelection) return {};
- const needsAsk = modelSwitchNeedsAsk(approvalModeFor(bot),
- registry.cliTarget(bot.modelSelection.instanceId)?.driverKind,
- registry.cliTarget(modelSelection.instanceId)?.driverKind);
- return { modelSelection, ...(needsAsk ? { approvalMode: "ask" as const } : {}) };
-}
@@ -2699,14 +2690,13 @@ function threadEngine(instanceId: string): ThreadEngine | undefined {
};
}
+/** Why a thread on `own` would run on the bot's model instead at turn start, or null when it runs as chosen. */
+function modelGivesWay(own: ModelSelection, botModel: ModelSelection) { return threadModelFallback(own, botModel, threadEngine, { refusal: policyModelRefusal, ...(hostedModels ? { allows: (selection: ModelSelection) => hostedModels!.allows(selection) } : {}) }); }
+
function threadModelGivingWay(botId: string, threadId: string): ModelSelection | null {
const bot = store.bot(botId);
const own = store.taskByThread(botId, threadId)?.modelSelection;
- if (!bot || !own) return null;
- return threadModelFallback(own, bot.modelSelection, threadEngine, {
- refusal: policyModelRefusal,
- ...(hostedModels ? { allows: (selection: ModelSelection) => hostedModels!.allows(selection) } : {}),
- }) ? own : null;
+ return bot && own && modelGivesWay(own, bot.modelSelection) ? own : null;
}
function turnSelection(botId: string, threadId: string): ModelSelection | undefined {
@@ -3927,7 +3917,7 @@ const handoffTicks = createHandoffTicks(), coordinator: Coordinator = createCoor
validate: (node, parent) => node.mode === "notify" && node.status !== "queued" ? undefined
: !node.parentId && node.groupId ? roomRootProblem(node)
: roomHandoffProblem(node, parent) ??
- (parent && store.bot(parent.botId)?.approvePeerComms && !fullAccessForSource(parent.botId, parent.threadId) && !node.approvalGranted ? "Sender now requires peer approval; submit a new approved request" : undefined),
+ (parent && !ownThreads.own(parent, node) && store.bot(parent.botId)?.approvePeerComms && !fullAccessForSource(parent.botId, parent.threadId) && !node.approvalGranted ? "Sender now requires peer approval; submit a new approved request" : undefined),
busy: n => {
const seat = parkedSeats.get(n.id);
if (seat && !turnResources.free(seat)) return true;
@@ -3987,7 +3977,7 @@ const handoffTicks = createHandoffTicks(), coordinator: Coordinator = createCoor
roomRequest: { id: child.id, phase: "result" },
from: bot ? { botId: bot.id, name: bot.name, color: bot.color } : undefined,
tool: {
- name: teammateResultRow(threadLanguage(parent.threadId), child, bot?.name, problem, child.groupId ? store.group(child.groupId)?.name : undefined),
+ name: teammateResultRow(threadLanguage(parent.threadId), child, ownThreads.name(parent, child) ?? bot?.name, problem, child.groupId ? store.group(child.groupId)?.name : undefined),
ok: child.status === "completed" && !problem,
...(child.status === "completed" && !problem && child.result.trim()
? { output: redactSecretsInText(child.result.trim()).slice(0, 2_000) } : {}),
@@ -4032,7 +4022,7 @@ const handoffTicks = createHandoffTicks(), coordinator: Coordinator = createCoor
usageTrace.expect(node.threadId, { node: node.id, ...(resumed ? { resumed } : {}) });
if (resumed && !group) {
const asking = coordinator.children(node.id).filter(child => child.question !== undefined);
- const settledFrom = [...new Set((asking.length ? asking : coordinator.children(node.id)).map(child => store.bot(child.botId)?.name ?? "Teammate"))];
+ const settledFrom = [...new Set((asking.length ? asking : coordinator.children(node.id)).map(child => ownThreads.name(node, child) ?? store.bot(child.botId)?.name ?? "Teammate"))];
const language = threadLanguage(node.threadId), who = settledFrom.length ? settledFrom.join(", ") : serverLine(language, "server.teammates.handedWork");
store.appendMessage(node.threadId, {
role: "bot", kind: "activity",
@@ -4066,6 +4056,7 @@ const handoffTicks = createHandoffTicks(), coordinator: Coordinator = createCoor
};
signal.addEventListener("abort", abort, { once: true });
if (signal.aborted) { abort(); return; }
+ const swapped = parent && ownThreads.own(parent, node) ? ownThreads.swapRefusal(bot, node.threadId) : null; if (swapped) { finish({ ok: false, text: swapped }); return; }
void startTurn(bot.id, turnText, {
threadId: node.threadId, cardContinuation: true, commsDepth: MAX_COMMS_DEPTH,
requestMessageId: directRequestOwners.get(node.threadId)?.generations.has(node.rootId)
@@ -4089,8 +4080,8 @@ const handoffTicks = createHandoffTicks(), coordinator: Coordinator = createCoor
? store.groupTaskByThread(scope.groupId, scope.threadId)?.title ?? store.group(scope.groupId)?.name
: store.taskByThread(scope.botId, scope.threadId)?.title;
return {
- requester: parent ? store.bot(parent.botId)?.name ?? "Teammate" : person ?? "the user",
- assignee: store.bot(node.botId)?.name ?? "Teammate",
+ requester: parent ? `${store.bot(parent.botId)?.name ?? "Teammate"}${ownThreads.own(parent, node) && thread !== undefined ? ` (you, in #${thread})` : ""}` : person ?? "the user",
+ assignee: `${store.bot(node.botId)?.name ?? "Teammate"}${parent && ownThreads.own(parent, node) ? ownThreads.label(node) : ""}`,
person,
...(thread !== undefined ? { thread } : {}), askTool: askToolName(botForThread(node.botId, node.threadId), (id) => registry.get(id)?.adapter.capabilities.askTool),
...(node.answeredBy?.kind === "bot" ? { answerer: store.bot(node.answeredBy.botId)?.name ?? "Teammate" } : {}),
@@ -9220,6 +9211,7 @@ const validateModelProposal = (selection: ModelSelection, current?: BotRecord):
}
return null;
};
+const ownThreads = createOwnThreads({ store, registry, node: (id) => coordinator.node(id), current: turnSelection, proposalRefusal: validateModelProposal, givesWay: modelGivesWay, modelName });
const teamMemory = new TeamMemory(join(DATA_DIR, "team-memory.json"));
const teamMemoryRequests = createTeamMemoryRequests({ teamMemory, store, sectionKey: sectionContextKey, decide: (row) => appendDecision(DATA_DIR, row) });
const outsideWrites = createOutsideWrites({ store, notify, language: (threadId) => threadLanguage(threadId), decide: (row) => appendDecision(DATA_DIR, row),
@@ -13529,7 +13521,7 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
return json(res, 201, proposed);
}
if (await dispatchRoutes([createInternalChiefTeamRoutes({ bot: () => store.bot(internalCapability.botId), requireActive: requireActiveInternalCapability,
- teams: teamSetupTeams, bots: () => store.bots, instances: () => registry.describe() })], { req, res, url, path, method, auth, json, readBody })) return;
+ teams: teamSetupTeams, bots: () => store.bots, instances: () => registry.describe() }), createInternalModelRoutes({ requireActive: requireActiveInternalCapability, menu: (search) => ownThreads.menu(internalCapability.botId, internalCapability.threadId, search) })], { req, res, url, path, method, auth, json, readBody })) return;
if (method === "POST" && path === "/api/internal/team-setup-requests") {
const parsed = z.object({ fromBotId: z.string().optional(), fromThreadId: z.string().optional(), plan: z.unknown() }).strict().safeParse(await readInternalBody());
if (!parsed.success) return json(res, 400, { error: "Invalid team setup request" });
@@ -13755,18 +13747,19 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
if (fresh && !EXTERNAL && internalCapability.openedThreads >= MAX_THREADS_OPENED_PER_TURN) {
return refuse(429, `You have already opened ${MAX_THREADS_OPENED_PER_TURN} threads this turn, which is the limit. Do not retry — finish your turn and tell the person which threads you still wanted to open, so they can open them or ask you again.`);
}
+ const toSelf = Boolean(call.ownThread) || ownThreads.answersOwn(call.answers, internalSender.id);
for (const target of targets) {
// Echo only the id the caller sent, never a bot's name.
const addressed = store.bot(target.botId);
const eligibility =
- target.botId === internalSender.id ? "Choose a teammate, not yourself"
+ target.botId === internalSender.id && !toSelf ? "Choose a teammate, not yourself"
: !addressed ? `No bot with id "${target.botId}" — call list_bots and copy the exact id from the result`
: addressed.hidden ? `The bot with id "${target.botId}" is no longer available — call list_bots for the ones you can reach`
: roomHandoffProblem(target, address);
if (eligibility) return refuse(403, eligibility);
}
let approvalGranted = false;
- if (peerReviewRequired(internalSender, address.threadId)) {
+ if (!toSelf && peerReviewRequired(internalSender, address.threadId)) {
const verdicts = await Promise.all(targets.map(target =>
requestPeerApproval(approvalBus, internalSender, store.bot(target.botId)!, call.message, call.consult ? "ask_bot" : "delegate_bot", address.threadId)));
requireActiveInternalCapability();
@@ -13818,7 +13811,7 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
if (!room) {
const opened = { botId: internalSender.id, name: internalSender.name, threadId: address.threadId, at: Date.now() };
const task = continued ?? (fresh
- ? store.createTask(target.botId, call.title ?? (call.message.replace(/\s+/g, " ").trim().slice(0, 60) || `From ${internalSender.name}`), false, call.projectId, opened, undefined, undefined, folder.cwd)
+ ? store.createTask(target.botId, call.title ?? (call.message.replace(/\s+/g, " ").trim().slice(0, 60) || `From ${internalSender.name}`), false, call.projectId, opened, call.ownThread?.approvalMode, call.ownThread?.modelSelection, folder.cwd)
: store.createTask(target.botId, `@${internalSender.name} · work`, false, undefined, { ...opened, kind: "work" }, undefined, undefined, folder.cwd));
if (!task) throw new Error("The recipient no longer exists");
target.threadId = task.threadId;
@@ -13828,7 +13821,7 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
const routed = lane ? { botId: target.botId, threadId: lane.threadId } : target;
outsideLineage.carry(address.threadId, routed.threadId);
const { node, duplicate } = coordinator.enqueue(address, generation, internalCapability.roomHandoffId, routed, call.message, {
- mode, reply, thread: lane || fresh ? "new" : "standing", approvalGranted, rework: call.rework, ...(lane ? {} : { requestBatchKey }),
+ mode, reply, thread: lane || fresh ? "new" : "standing", approvalGranted, rework: call.rework, ...(lane ? {} : { requestBatchKey }), ...(call.ownThread ? { ownThread: true } : {}),
...(call.doneWhen ? { doneWhen: call.doneWhen } : {}),
});
usageTrace.link(node.id, node.parentId, { threadId: internalCapability.threadId, turnId: liveTurnByThread.get(internalCapability.threadId) ?? "" }); if (!duplicate) actingPeople.handOn(internalCapability, node);
@@ -14165,9 +14158,12 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
projectId = project.id;
}
const sourceTitle = owner.group ? owner.group.name : (store.taskByThread(from.id, fromThreadId)?.title ?? "");
- const picked = body.modelSelection === undefined ? null : checkedModelSelection(body.modelSelection, undefined, true); const refused = !picked ? null : target.id !== from.id ? "model_selection is only for threads on yourself" : !picked.ok ? picked.error : validateModelProposal(picked.selection, from); if (refused) return json(res, 400, { error: refused });
+ const picked = body.modelSelection === undefined ? null : checkedModelSelection(body.modelSelection, undefined, true); const refused = !picked ? null : target.id !== from.id ? "model_selection is only for threads on yourself" : !picked.ok ? picked.error : ownThreads.refusal(picked.selection, from); if (refused) return json(res, 400, { error: refused });
if (target.id === from.id) { const selfRefused = selfThreadRefusal({ handoff: Boolean(internalCapability.roomHandoffId), requestLine: store.activePath(fromThreadId).findLast((line) => line.role === "user" && line.kind === "text") }); if (selfRefused) return json(res, 409, { error: selfRefused });
- const inherited = picked?.ok ? { modelSelection: picked.selection, approvalMode: undefined } : parentThreadModel(from.id, fromThreadId);
+ const inherited = picked?.ok ? { modelSelection: picked.selection, approvalMode: undefined } : ownThreads.inherited(from.id, fromThreadId);
+ if (body.reportBack === true) { if (owner.group) return json(res, 400, { error: "report_back works only from your own conversation, not a room. Leave it out; the thread's result then stays in that thread." });
+ const result = await coordinateBots({ botIds: [from.id], message, rework: false, thread: "new", reply: "resume", consult: false, title, projectId, ownThread: inherited }), receipt = (result.body.receipts as PeerDeliveryReceipt[] | undefined)?.[0];
+ return json(res, result.status === 200 ? 201 : result.status, { ...result.body, self: true, reportBack: true, title, botId: from.id, botName: from.name, threadId: receipt?.threadId, requestId: receipt?.requestId }); }
const task = store.createTask(from.id, title, false, projectId, { botId: from.id, name: from.name, at: Date.now() }, inherited.approvalMode, inherited.modelSelection);
if (!task) return json(res, 500, { error: "couldn't create that thread" });
threadStarters.set(task.threadId, (CLOUD_TEAM ? teamConnections.handOnFor(internalCapability.threadId, internalCapability.generation) : null) ?? openerFrom(fromThreadId));
diff --git a/server/routes/internal-models.test.ts b/server/routes/internal-models.test.ts
new file mode 100644
index 0000000000..af2126bf71
--- /dev/null
+++ b/server/routes/internal-models.test.ts
@@ -0,0 +1,91 @@
+import { describe, expect, it, vi } from "vitest";
+
+import type { ModelSelection } from "../../shared/wire.ts";
+import { MENU_FOUND, MENU_SHORT, modelMenu as menuOf, type MenuEngine } from "./internal-models.ts";
+
+const engine = (instanceId: string, ids: readonly string[], extra: Partial<MenuEngine> = {}): MenuEngine => ({
+ instanceId, driverKind: instanceId, displayName: instanceId[0]!.toUpperCase() + instanceId.slice(1),
+ models: { default: ids[0] ?? "", options: ids.map((id) => ({ id, label: id })) },
+ adapter: { capabilities: {} },
+ ...extra,
+});
+const current: ModelSelection = { instanceId: "claude", model: "claude-sonnet-5" };
+const opens = () => null;
+const modelMenu = (input: Omit<Parameters<typeof menuOf>[0], "down"> & { down?: (engine: MenuEngine) => boolean }) => menuOf({ down: () => false, ...input });
+
+describe("modelMenu", () => {
+ it("keeps a 2,000-model catalog to a short list, its current model first, and counts the rest", () => {
+ const huge = engine("opencode", Array.from({ length: 2_000 }, (_, i) => `provider/model-${i}`));
+ const refusal = vi.fn(opens);
+ const menu = modelMenu({ engines: [huge], current: { instanceId: "opencode", model: "provider/model-1500" }, pinned: [], refusal });
+ expect(menu.engines).toEqual([{ instanceId: "opencode", name: "Opencode",
+ models: ["provider/model-1500", "provider/model-0", ...Array.from({ length: MENU_SHORT - 2 }, (_, i) => `provider/model-${i + 1}`)], more: 2_000 - MENU_SHORT }]);
+ expect(refusal).toHaveBeenCalledTimes(MENU_SHORT);
+ expect(JSON.stringify(menu).length).toBeLessThan(400);
+ });
+
+ it("lists a small catalog whole, without what the organization turned off, with efforts and only the labels that add something", () => {
+ const claude = engine("claude", [], {
+ models: { default: "claude-sonnet-5", options: [
+ { id: "claude-sonnet-5", label: "Claude Sonnet 5" },
+ { id: "claude-opus-5", label: "Claude Opus 5" },
+ { id: "claude-haiku-5", label: "Haiku", orgBlocked: true },
+ { id: "default", label: "Default (recommended)" },
+ ] },
+ adapter: { capabilities: { effortLevels: ["low", "high", "max"] } },
+ });
+ expect(modelMenu({ engines: [claude], current, pinned: [], refusal: opens })).toEqual({ current, engines: [{
+ instanceId: "claude", name: "Claude", models: ["claude-sonnet-5", "claude-opus-5", { id: "default", label: "Default (recommended)" }], efforts: ["low", "high", "max"],
+ }] });
+ });
+
+ it("marks an engine unusable with start_thread's own reason after a few refusals, without checking the rest of a big catalog", () => {
+ const grok = engine("grok", Array.from({ length: 500 }, (_, i) => `grok-${i}`));
+ const refusal = vi.fn((selection: ModelSelection) => selection.instanceId === "grok" ? "Grok · grok-0 can't run now: it is signed out." : null);
+ const menu = modelMenu({ engines: [grok, engine("claude", ["claude-sonnet-5"])], current, pinned: [], refusal });
+ expect(menu.engines).toEqual([
+ { instanceId: "grok", name: "Grok", unusable: "Grok · grok-0 can't run now: it is signed out." },
+ { instanceId: "claude", name: "Claude", models: ["claude-sonnet-5"] },
+ ]);
+ expect(refusal.mock.calls.filter(([selection]) => selection.instanceId === "grok")).toHaveLength(3);
+ });
+
+ it("stops after a few refusals in a row even when the current model passed, instead of checking a whole catalog", () => {
+ const opencode = engine("opencode", Array.from({ length: 2_000 }, (_, i) => `provider/model-${i}`));
+ const mine = { instanceId: "opencode", model: "provider/model-7" };
+ const refusal = vi.fn((selection: ModelSelection) => selection.model === mine.model ? null : "OpenCode can't run now: its engine is unavailable.");
+ const menu = modelMenu({ engines: [opencode], current: mine, pinned: [], refusal });
+ expect(menu.engines).toEqual([{ instanceId: "opencode", name: "Opencode", models: ["provider/model-7"], more: 2_000 - 4 }]);
+ expect(refusal).toHaveBeenCalledTimes(4);
+ });
+
+ it("names engines that can't run anything in one list instead of a row each, and search finds them by name", () => {
+ const engines = [engine("claude", ["claude-sonnet-5"]), engine("cursor", ["auto"]), engine("mistral", ["mistral-large"])];
+ const down = (row: MenuEngine) => row.instanceId !== "claude";
+ const refusal = vi.fn((_selection: ModelSelection) => null);
+ expect(modelMenu({ engines, current, pinned: [], refusal, down })).toEqual({ current,
+ engines: [{ instanceId: "claude", name: "Claude", models: ["claude-sonnet-5"] }], unavailable: ["Cursor", "Mistral"] });
+ expect(refusal.mock.calls.every(([selection]) => selection.instanceId === "claude")).toBe(true);
+ expect(modelMenu({ engines, current, pinned: [], refusal: opens, down, search: "mistral" })).toEqual({ current, engines: [], unavailable: ["Mistral"] });
+ });
+
+ it("leaves out a single model start_thread would refuse and keeps the engine", () => {
+ const menu = modelMenu({ engines: [engine("codex", ["gpt-5.5", "gpt-5.5-pro", "gpt-5.5-mini"])], current, pinned: [],
+ refusal: (selection) => selection.model === "gpt-5.5-pro" ? "This account's organization turned that model off." : null });
+ expect(menu.engines).toEqual([{ instanceId: "codex", name: "Codex", models: ["gpt-5.5", "gpt-5.5-mini"] }]);
+ });
+
+ it("search matches engine names, ids and labels across engines, drops engines with no match, and caps what it returns", () => {
+ const engines = [
+ engine("claude", ["claude-sonnet-5", "claude-opus-5"]),
+ engine("opencode", Array.from({ length: 300 }, (_, i) => `anthropic/claude-opus-${i}`)),
+ engine("codex", ["gpt-5.5"]),
+ ];
+ const menu = modelMenu({ engines, current, pinned: [], refusal: opens, search: " OPUS " });
+ expect(menu.engines.map((row) => row.instanceId)).toEqual(["claude", "opencode"]);
+ expect(menu.engines[0]!.models).toEqual(["claude-opus-5"]);
+ expect(menu.engines[1]!.models).toHaveLength(MENU_FOUND - 1);
+ expect(menu.engines[1]!.more).toBe(300 - (MENU_FOUND - 1));
+ expect(modelMenu({ engines, current, pinned: [], refusal: opens, search: "codex" }).engines).toEqual([{ instanceId: "codex", name: "Codex", models: ["gpt-5.5"] }]);
+ });
+});
diff --git a/server/routes/internal-models.ts b/server/routes/internal-models.ts
new file mode 100644
index 0000000000..81a70def0f
--- /dev/null
+++ b/server/routes/internal-models.ts
@@ -0,0 +1,118 @@
+import type { ModelSelection } from "../../shared/wire.ts";
+import { PASS, type RouteHandler } from "./table.ts";
+
+/** Per engine without `search`, as in t3code's orchestrator_capabilities: one call lands whole in the bot's context. */
+export const MENU_SHORT = 8;
+/** An engine with this many models or fewer is listed whole: "more: 2" would cost as much as the two ids. */
+export const MENU_WHOLE = 12;
+/** Models across all engines for one `search`. */
+export const MENU_FOUND = 20;
+/** Refusals in a row that end an engine's scan: with nothing listed yet the engine is unusable, else the rest is left to search. */
+const MENU_CHECKS = 3;
+export const SEARCH_MAX_CHARS = 200;
+
+/** One live engine as the registry holds it in memory: list_models probes no engine. */
+export interface MenuEngine {
+ instanceId: string;
+ driverKind: string;
+ displayName: string | undefined;
+ models: { default: string; options: ReadonlyArray<{ id: string; label: string; orgBlocked?: true }> };
+ adapter: { capabilities: { effortLevels?: readonly string[] } };
+}
+
+/** An id alone when its label only restates it. */
+export type MenuModel = string | { id: string; label: string };
+
+export interface MenuRow {
+ instanceId: string;
+ name: string;
+ models?: MenuModel[];
+ /** Matching models not listed: `search` finds them. */
+ more?: number;
+ efforts?: readonly string[];
+ /** Why no thread can run on this engine now; it then lists no models. */
+ unusable?: string;
+}
+
+export interface ModelMenu {
+ current: ModelSelection;
+ engines: MenuRow[];
+ /** Engines that can't run anything now (not set up, turned off, unreachable), by name: a row each would cost more than they say. */
+ unavailable?: string[];
+}
+
+const squash = (text: string) => text.toLowerCase().replace(/[^a-z0-9]/g, "");
+
+/** The engines and models a bot may open a thread of its own on. `refusal` is the check start_thread applies, so a listed
+ * model always opens; the current model, then `pinned` ones, lead their engine's list. */
+export function modelMenu(input: {
+ engines: readonly MenuEngine[];
+ current: ModelSelection;
+ pinned: readonly ModelSelection[];
+ refusal(selection: ModelSelection): string | null;
+ down(engine: MenuEngine): boolean;
+ search?: string;
+}): ModelMenu {
+ const terms = input.search?.toLowerCase().split(/\s+/).filter(Boolean) ?? [];
+ let room = MENU_FOUND;
+ const engines: MenuRow[] = [], unavailable: string[] = [];
+ for (const engine of input.engines) {
+ const { instanceId } = engine;
+ const name = engine.displayName || engine.driverKind;
+ const labels = new Map(engine.models.options.filter((option) => !option.orgBlocked).map((option) => [option.id, option.label]));
+ const ids = [...new Set([...[input.current, ...input.pinned].filter((pin) => pin.instanceId === instanceId).map((pin) => pin.model), engine.models.default, ...labels.keys()])]
+ .filter(Boolean);
+ const matching = terms.length ? ids.filter((id) => terms.every((term) => `${name} ${id} ${labels.get(id) ?? ""}`.toLowerCase().includes(term))) : ids;
+ if (!matching.length && !(terms.length && terms.every((term) => name.toLowerCase().includes(term)))) continue;
+ if (input.down(engine)) {
+ unavailable.push(name);
+ continue;
+ }
+ if (!matching.length) continue;
+ const cap = terms.length ? room : matching.length <= MENU_WHOLE ? matching.length : MENU_SHORT;
+ const listed: string[] = [];
+ let examined = 0, refusedInRow = 0, why: string | null = null;
+ for (const id of matching) {
+ if (listed.length >= cap) break;
+ examined += 1;
+ const refused = input.refusal({ instanceId, model: id });
+ if (!refused) {
+ listed.push(id);
+ refusedInRow = 0;
+ continue;
+ }
+ why ??= refused;
+ if (++refusedInRow >= MENU_CHECKS) break;
+ }
+ const more = matching.length - examined;
+ if (!listed.length && why) {
+ engines.push({ instanceId, name, unusable: why });
+ continue;
+ }
+ room -= listed.length;
+ const efforts = engine.adapter.capabilities.effortLevels ?? [];
+ engines.push({
+ instanceId, name,
+ ...(listed.length ? { models: listed.map((id): MenuModel => {
+ const label = labels.get(id);
+ return label && !squash(id).includes(squash(label)) ? { id, label } : id;
+ }) } : {}),
+ ...(more > 0 ? { more } : {}),
+ ...(efforts.length ? { efforts } : {}),
+ });
+ }
+ return { current: input.current, engines, ...(unavailable.length ? { unavailable } : {}) };
+}
+
+/** Only dispatch inside the internal capability gate: the menu is the calling bot's own. */
+export function createInternalModelRoutes(deps: {
+ requireActive(): void;
+ menu(search: string | undefined): ModelMenu | null;
+}): RouteHandler {
+ return async ({ res, url, path, method, json }) => {
+ if (method !== "GET" || path !== "/api/internal/models") return PASS;
+ deps.requireActive();
+ const menu = deps.menu(url.searchParams.get("search")?.trim().slice(0, SEARCH_MAX_CHARS) || undefined);
+ return menu ? json(res, 200, menu) : json(res, 404, { error: "This bot no longer exists." });
+ };
+}
diff --git a/server/runtime-coordinator.test.ts b/server/runtime-coordinator.test.ts
index 3934712003..ecbacaa1af 100644
--- a/server/runtime-coordinator.test.ts
+++ b/server/runtime-coordinator.test.ts
@@ -402,6 +402,29 @@ describe("RuntimeCoordinator: refusals in the legacy words", () => {
await w.host.release(awaited.node.id, { ok: true, text: "done" });
});
+ it("lets a bot hand work to a new thread of its own only as an own thread, and every other way back stays refused", async () => {
+ const helping: Script = (node) => node.threadId.startsWith("chief-helper") || node.botId === "builder" ? "hold" : undefined;
+ const w = world(helping);
+ const helper: RoomAddress = { botId: "chief", threadId: "chief-helper-1" };
+ const own = (source: RoomAddress, parentId: string | undefined, target: RoomAddress, text = "Review the diff") => {
+ if (!parentId) begun(w, source, "gen-1");
+ return w.coordinator.enqueue(source, "gen-1", parentId, target, text, { ownThread: true });
+ };
+ expect(() => send(w, chief, "gen-1", undefined, helper, "Review the diff")).toThrow("Cannot assign work back to an ancestor; results return automatically");
+ expect(() => own(chief, undefined, chief)).toThrow(/back to an ancestor/);
+ expect(() => own(chief, undefined, inRoom("chief"))).toThrow(/back to an ancestor/);
+ send(w, chief, "gen-1", undefined, builder, "Build it");
+ const first = own(chief, undefined, helper);
+ expect(first).toMatchObject({ duplicate: false, node: { botId: "chief", threadId: "chief-helper-1", parentId: "gen-1", status: "queued" } });
+ expect(own(chief, undefined, { botId: "chief", threadId: "chief-helper-2" }).duplicate).toBe(false);
+ w.coordinator.tick();
+ expect(() => own(helper, first.node.id, { botId: "chief", threadId: "chief-helper-3" })).toThrow(/back to an ancestor/);
+ const work = w.coordinator.children("gen-1").find(child => child.botId === "builder")!;
+ expect(() => own(builder, work.id, { botId: "chief", threadId: "chief-helper-4" })).toThrow(/back to an ancestor/);
+ await w.host.release(first.node.id, { ok: true, text: "Looks right" });
+ expect(own(chief, undefined, { botId: "chief", threadId: "chief-helper-5" }).duplicate).toBe(false);
+ });
+
it("refuses a second assignment to a teammate that completed one, unless it is rework", async () => {
const w = world();
const { node } = send(w, chief, "gen-1", undefined, builder, "Build it");
diff --git a/server/runtime-coordinator.ts b/server/runtime-coordinator.ts
index 6a3f50008e..013038cc82 100644
--- a/server/runtime-coordinator.ts
+++ b/server/runtime-coordinator.ts
@@ -8,8 +8,8 @@ import { importLegacyDelegations, importLegacyHandoffs, type LegacyThreadResolve
import { openRuntimeStore, type RuntimeStore } from "./runtime/store.ts";
import { personOnly, requesterDecides, withDefault } from "./runtime/questions.ts";
import { isStatusOnly, mayBeStatusOnly, statusReplyPrompt } from "./runtime/status-reply.ts";
-import { answersSender, childrenSince, clip, isTerminal, path } from "./runtime/tree.ts";
-import type { Answerer, Assignment, EndResult, Origin, Owner, Reply, Requester, RunInput, RunResult, StatusView, TurnRunner } from "./runtime/types.ts";
+import { answersSender, childrenSince, clip, isTerminal, ownThread, path } from "./runtime/tree.ts";
+import type { Answerer, Assignee, Assignment, EndResult, Origin, Owner, Reply, Requester, RunInput, RunResult, StatusView, TurnRunner } from "./runtime/types.ts";
import { sameRequest } from "./same-request.ts";
const NOT_RUNNING = "The originating room task is no longer running";
@@ -238,17 +238,22 @@ export class RuntimeCoordinator implements Coordinator {
const kind: HandoffView["kind"] = target.groupId !== undefined && target.groupId === source.groupId ? "assignment" : "work";
const lineage = path(this.store, parent);
const root = lineage[0]!;
- if (!answersSender(parent, mode, target) && lineage.some(n => ancestorOf(address(n), target))) throw new Error(ANCESTOR);
+ const assignee: Assignee = { botId: target.botId, destination: { kind: target.groupId ? "room_thread" : thread === "standing" ? "standing_thread" : "work_thread",
+ threadId: target.threadId, ...(target.groupId ? { groupId: target.groupId } : {}) } };
+ const own = ownThread(lineage, assignee, options.ownThread);
+ if (!answersSender(parent, mode, target) && (own ? lineage.slice(0, -1) : lineage).some(n => ancestorOf(address(n), target))) throw new Error(ANCESTOR);
if (this.stoppedFor(root, target.botId)) throw new Error(STOPPED_AGAIN);
const siblings = this.store.children(parent.id);
- const existing = siblings.findLast(c => c.assignee.botId === target.botId && c.assignee.destination.groupId === target.groupId && c.brief === brief && c.mode === mode);
+ const existing = siblings.findLast(c => c.assignee.botId === target.botId && c.assignee.destination.groupId === target.groupId && c.brief === brief && c.mode === mode
+ && (!own || c.assignee.destination.threadId === target.threadId));
if (existing && !(rework && isTerminal(existing))) return { node: view(existing, parent), duplicate: true };
const limited = this.handoffLimit?.refusal(target.botId, () => this.live().filter(a => a.parentId !== undefined).length);
if (limited) throw new Error(limited);
- if (mode === "work" && !rework && siblings.some(c => c.mode === "work" && kindOf(c.assignee.destination.groupId, parent) === kind &&
+ if (mode === "work" && !rework && !own && siblings.some(c => c.mode === "work" && kindOf(c.assignee.destination.groupId, parent) === kind &&
c.assignee.destination.groupId === target.groupId && c.assignee.botId === target.botId && c.status === "completed")) throw new Error(ALREADY_COMPLETED);
if (kind === "work" && target.groupId && lineage.some(n => n.assignee.destination.groupId === target.groupId)) throw new Error(ROOM_ANCESTOR);
- const waiting = mode === "notify" || target.groupId !== undefined ? undefined : this.waitingOn(source.botId, target.botId);
+ // A bot's own threads wait on it by design and can never ask it back (the ancestor rule above), so no two bots can cross.
+ const waiting = own || mode === "notify" || target.groupId !== undefined ? undefined : this.waitingOn(source.botId, target.botId);
if (waiting) throw new Error(crossed(this.host.names(this.project(waiting.request), this.project(waiting.parent)).requester, waiting.request));
const wanted: Reply = mode === "notify" ? "none" : options.reply ?? "resume";
const reply: Reply = wanted === "none" ? "none" : root.reply === "poll" ? "poll" : wanted;
@@ -259,9 +264,8 @@ export class RuntimeCoordinator implements Coordinator {
parentId: parent.id,
origin: parent.origin,
requester,
- assignee: { botId: target.botId, destination: { kind: target.groupId ? "room_thread" : thread === "standing" ? "standing_thread" : "work_thread",
- threadId: target.threadId, ...(target.groupId ? { groupId: target.groupId } : {}) } },
- mode, reply, brief: text, rework,
+ assignee, mode, reply, brief: text, rework,
+ ...(own ? { ownThread: true } : {}),
...(options.doneWhen ? { doneWhen: options.doneWhen } : {}),
levels: { own: level.level, ...(level.chief !== undefined ? { chief: level.chief } : {}) },
...(level.driverKind !== undefined ? { driverKind: level.driverKind } : {}),
diff --git a/server/runtime/runtime.ts b/server/runtime/runtime.ts
index ab6bbbd0e1..dff670d019 100644
--- a/server/runtime/runtime.ts
+++ b/server/runtime/runtime.ts
@@ -4,7 +4,7 @@ import { randomUUID } from "node:crypto";
import { composeEnvelope } from "./envelope.ts";
import { assignmentLevel } from "./level.ts";
import type { RuntimeStore } from "./store.ts";
-import { answersSender, asking, awaited, childrenSince, settledSince, clip, continuations, CUT_TWICE, duration, isTerminal, loopStop, nextGuard, outwardDetail, ownsConversation, path, restartNote, wakeOwner } from "./tree.ts";
+import { answersSender, asking, awaited, childrenSince, settledSince, clip, continuations, CUT_TWICE, duration, isTerminal, loopStop, nextGuard, outwardDetail, ownsConversation, ownThread, path, restartNote, wakeOwner } from "./tree.ts";
import { DEFAULT_LIMITS, type Answerer, type Assignment, type Assignee, type Clock, type EndResult, type EnqueueRequest, type EnqueueResult, type EnvelopeNames,
type EventKind, type InboxItem, type InboxKind, type Level, type Limits, type LiveEdge, type Origin, type Outcome, type Owner,
type Reply, type Requester, type RunInput, type RunResult, type StatusView, type TurnRunner } from "./types.ts";
@@ -192,7 +192,8 @@ export class Runtime {
const lineage = parent ? path(this.store, parent) : [];
const root = lineage[0];
const target = req.assignee;
- if (!answersSender(parent, mode, { botId: target.botId, ...target.destination }) && lineage.some(a => a.assignee.botId === target.botId &&
+ const ancestors = ownThread(lineage, target, req.ownThread) ? lineage.slice(0, -1) : lineage;
+ if (!answersSender(parent, mode, { botId: target.botId, ...target.destination }) && ancestors.some(a => a.assignee.botId === target.botId &&
(!a.assignee.destination.groupId || !target.destination.groupId || a.assignee.destination.groupId === target.destination.groupId))) {
return refuse("Cannot assign work back to an ancestor; results return automatically");
}
diff --git a/server/runtime/tree.ts b/server/runtime/tree.ts
index 086d3f4c07..22748c403d 100644
--- a/server/runtime/tree.ts
+++ b/server/runtime/tree.ts
@@ -1,6 +1,6 @@
// "Since this turn began" is read from event ids (one global order), never timestamps: a clock can step back.
import type { RuntimeStore } from "./store.ts";
-import { terminal, type Assignment, type Mode, type Owner, type TurnEvidence } from "./types.ts";
+import { terminal, type Assignee, type Assignment, type Mode, type Owner, type TurnEvidence } from "./types.ts";
export const CUT_TWICE = "Interrupted by another OpenMausBot restart after resuming once; not resumed again. Some of its steps may already have taken effect.";
@@ -81,6 +81,15 @@ export const answersSender = (parent: Assignment | undefined, mode: Mode, target
mode === "notify" && parent?.reply === "none" && parent.requester.botId === target.botId && parent.requester.threadId === target.threadId
&& parent.assignee.destination.groupId === undefined && target.groupId === undefined;
+/** A bot's own new thread: the one hand-off that may reach its requester's bot again. Only for a direct thread no
+ * conversation in the chain is in, asked from a direct conversation; the requesting turn is then the one ancestor passed over. */
+export function ownThread(lineage: readonly Assignment[], target: Assignee, asked: boolean | undefined): boolean {
+ const requester = lineage.at(-1);
+ return asked === true && requester !== undefined && requester.assignee.botId === target.botId
+ && requester.assignee.destination.groupId === undefined && target.destination.groupId === undefined
+ && target.destination.kind === "work_thread" && !lineage.some(a => a.assignee.destination.threadId === target.destination.threadId);
+}
+
export function path(store: RuntimeStore, n: Assignment): Assignment[] {
const out: Assignment[] = [];
const seen = new Set<string>();
diff --git a/server/runtime/types.ts b/server/runtime/types.ts
index f3b7c17c0a..fa1e8925cd 100644
--- a/server/runtime/types.ts
+++ b/server/runtime/types.ts
@@ -217,6 +217,8 @@ export interface EnqueueRequest {
driverKind?: string;
approved?: boolean;
batchKey?: string;
+ /** A new thread of the requester's own bot (tree.ts ownThread): the requesting turn is not an ancestor it refuses. */
+ ownThread?: boolean;
}
export type EnqueueResult =
diff --git a/server/thread-aware-bots.e2e.test.ts b/server/thread-aware-bots.e2e.test.ts
index c05c1387dd..d5675021a4 100644
--- a/server/thread-aware-bots.e2e.test.ts
+++ b/server/thread-aware-bots.e2e.test.ts
@@ -41,7 +41,7 @@ const api = async (
/** A gate written before the turn starts lets it finish at once. Depth-1 turns (no thread id in their MCP config) share the "peer" gate. */
const release = (threadId: string) => writeFileSync(join(gates, `${threadId}.gate`), "finish");
-const dumpOf = (threadId: string): { systemPrompt?: string; mcpConfig?: any } | undefined => {
+const dumpOf = (threadId: string): { argv?: string[]; systemPrompt?: string; mcpConfig?: any } | undefined => {
try {
return JSON.parse(readFileSync(join(gates, `${threadId}.json`), "utf8"));
} catch {
@@ -194,6 +194,13 @@ beforeAll(async () => {
displayName: "Gated fixture",
config: { cli: gated },
},
+ plain: {
+ driver: "cursorAgent",
+ displayName: "Plain fixture",
+ // Answered the way cursor-agent answers: any other --version is another program behind the path, so the engine is unavailable.
+ environment: { FAKE_ACP_VERSION: "2026.10.22-27dcf5f" },
+ config: { cli: FAKE_ACP, fullAuto: true },
+ },
curious: {
driver: "grokAgent",
displayName: "Curious fixture",
@@ -392,6 +399,146 @@ describe("start_thread on yourself", () => {
}, 60_000);
});
+describe("start_thread on another model, reporting back", () => {
+ it("runs the thread on the chosen model and resumes the opener with its result", async () => {
+ const pm = await createBot("Pam", "gated");
+ const opus = { instanceId: "gated", model: "claude-opus-5" };
+ try {
+ const token = await heldTurn(pm, "Get a second opinion on the diff.");
+ const models = await api("GET", "/api/internal/models", undefined, token);
+ expect(models.status).toBe(200);
+ expect(models.body.current).toMatchObject({ instanceId: "gated", model: "claude-sonnet-5" });
+ expect(models.body.engines.find((row: any) => row.instanceId === "gated").models.map((model: any) => model.id ?? model)).toEqual(expect.arrayContaining(["claude-sonnet-5", "claude-opus-5"]));
+ const unknown = await api("POST", "/api/internal/threads",
+ { title: "Review", message: "go", modelSelection: { instanceId: "gated", model: "no-such-model" }, reportBack: true }, token);
+ expect([unknown.status, unknown.body.error]).toEqual([400, 'model "no-such-model" is not offered by instance "gated"']);
+ expect((await botState(pm.id)).tasks).toHaveLength(1);
+
+ const opened = await api("POST", "/api/internal/threads",
+ { title: "Review: Opus", message: "Review the diff. [[gate:own-review]]", modelSelection: opus, reportBack: true }, token);
+ expect(opened.status, JSON.stringify(opened.body)).toBe(201);
+ expect(opened.body).toMatchObject({ self: true, reportBack: true, title: "Review: Opus" });
+ const { threadId, requestId } = opened.body;
+ expect(await taskOf(pm.id, threadId)).toMatchObject({ title: "Review: Opus", modelSelection: opus, openedBy: { botId: pm.id, threadId: pm.threadId } });
+ expect((await messages(pm.threadId)).find((message) => message.threadRef?.threadId === threadId))
+ .toMatchObject({ tool: { name: "Opened thread #Review: Opus", ok: true } });
+
+ release(pm.threadId);
+ await expect.poll(() => dumpOf("own-review")?.argv?.join(" "), { timeout: 15_000 }).toContain("claude-opus-5");
+ expect(handoffs().find((node) => node.id === requestId)).toMatchObject({ botId: pm.id, threadId, status: "running" });
+ release("own-review");
+ await expect.poll(() => handoffs().find((node) => node.id === requestId)?.status, { timeout: 15_000 }).toBe("completed");
+ await expect.poll(async () => (await messages(pm.threadId)).find((message) => message.roomRequest?.id === requestId && message.roomRequest.phase === "result")
+ ?.tool?.name, { timeout: 15_000 }).toBe("#Review: Opus replied");
+ expect(promptsOf("own-review")[0].message.content).toContain("Brief from @Pam (you, in #Get a second opinion on the diff.):\nReview the diff.");
+ await expect.poll(() => promptsOf("own-review").at(-1)?.message.content ?? "", { timeout: 15_000 })
+ .toContain(`[From @Pam (your thread #Review: Opus, on claude-opus-5) (bot) · report on assignment ${requestId}: done`);
+ expect((await messages(pm.threadId)).some((message) => message.tool?.name === "Resumed with #Review: Opus results, reviewing")).toBe(true);
+ await expect.poll(async () => (await botState(pm.id))?.busy, { timeout: 15_000 }).toBe(false);
+ expect((await botState(pm.id)).modelSelection).toMatchObject({ model: "claude-sonnet-5" });
+ } finally {
+ await cleanup([pm.id]);
+ }
+ }, 60_000);
+
+ it("runs it on another engine, and refuses report_back from a room", async () => {
+ const pm = await createBot("Pam", "gated");
+ try {
+ const token = await heldTurn(pm, "Ask a different engine.");
+ const listed = (await api("GET", "/api/internal/models", undefined, token)).body;
+ const row = (instanceId: string) => listed.engines.find((engine: any) => engine.instanceId === instanceId);
+ expect(row("curious")).toEqual({ instanceId: "curious", name: "Curious fixture", unusable: expect.stringContaining("can't run now: it is signed out") });
+ const { instances } = (await api("GET", "/api/instances")).body;
+ const pick = (instanceId: string) => {
+ const engine = instances.find((instance: any) => instance.instanceId === instanceId);
+ return { instanceId, model: engine.models.default || engine.models.options[0].id };
+ };
+ const signedOut = await api("POST", "/api/internal/threads", { title: "Review: Grok", message: "Review the diff.", modelSelection: pick("curious"), reportBack: true }, token);
+ // One check behind both: the list's reason is the refusal, word for word.
+ expect([signedOut.status, signedOut.body.error]).toEqual([400, row("curious").unusable]);
+ expect((await botState(pm.id)).tasks).toHaveLength(1);
+ const first = row("plain").models[0], selection = { instanceId: "plain", model: first.id ?? first };
+ const opened = await api("POST", "/api/internal/threads", { title: "Review: Cursor", message: "Review the diff.", modelSelection: selection, reportBack: true }, token);
+ expect(opened.status, JSON.stringify(opened.body)).toBe(201);
+ expect(await taskOf(pm.id, opened.body.threadId)).toMatchObject({ modelSelection: selection });
+ release(pm.threadId);
+ await expect.poll(() => handoffs().find((node) => node.id === opened.body.requestId)?.status, { timeout: 15_000 }).toBe("completed");
+ await expect.poll(async () => (await messages(pm.threadId)).some((message) => message.tool?.name === "#Review: Cursor replied"), { timeout: 15_000 }).toBe(true);
+ expect((await messages(opened.body.threadId)).filter((message) => message.tool?.name?.startsWith("notice: This thread's model"))).toEqual([]);
+ expect(await taskOf(pm.id, opened.body.threadId)).toMatchObject({ modelSelection: selection });
+ await expect.poll(async () => (await botState(pm.id))?.busy, { timeout: 15_000 }).toBe(false);
+
+ const { group } = (await api("POST", "/api/groups", { name: "Review room", memberIds: [pm.id],
+ setup: { bulletin: "", defaultResponder: { kind: "member", botId: pm.id } } })).body;
+ const inRoom = await api("POST", "/api/internal/threads", { title: "Review", message: "go", reportBack: true }, await mintedToken(pm.id, group.threadId));
+ expect([inRoom.status, inRoom.body.error]).toEqual([400, "report_back works only from your own conversation, not a room. Leave it out; the thread's result then stays in that thread."]);
+ expect((await botState(pm.id)).tasks.some((task: any) => task.title === "Review")).toBe(false);
+ } finally {
+ await cleanup([pm.id]);
+ }
+ }, 60_000);
+ it("lets the opener answer its own thread's question, and that thread carries on with the answer", async () => {
+ const pm = await createBot("Pam", "gated");
+ try {
+ // With no teammates the brief is the end of the prompt, so the echoing engine's reply ends on its question.
+ expect((await api("PATCH", `/api/bots/${pm.id}`, { peers: [] })).status).toBe(200);
+ const token = await heldTurn(pm, "Get a second opinion on the wording.");
+ const opened = await api("POST", "/api/internal/threads",
+ { title: "Review: wording", message: "Check the wording. [[gate:own-ask]]\nNEEDS INPUT: Formal or casual?", reportBack: true }, token);
+ expect(opened.status, JSON.stringify(opened.body)).toBe(201);
+ const { requestId } = opened.body;
+ release("own-ask");
+ await expect.poll(() => handoffs().find((node) => node.id === requestId)?.status, { timeout: 15_000 }).toBe("waiting");
+
+ const answered = await api("POST", "/api/internal/coordinate-bots", { botIds: [pm.id], message: "Casual.", answers: requestId }, token);
+ expect(answered.status, JSON.stringify(answered.body)).toBe(200);
+ expect(answered.body.receipts).toMatchObject([{ outcome: "injected", requestId }]);
+ await expect.poll(() => promptsOf("own-ask").at(-1)?.message.content ?? "", { timeout: 15_000 }).toContain("Casual.");
+ await expect.poll(() => handoffs().find((node) => node.id === requestId)?.status, { timeout: 15_000 }).toBe("completed");
+ expect((await botState(pm.id)).tasks.filter((task: any) => task.title === "Review: wording")).toHaveLength(1);
+
+ const notMine = await api("POST", "/api/internal/coordinate-bots", { botIds: [pm.id], message: "Do it again." }, token);
+ expect([notMine.status, notMine.body.error]).toEqual([403, "Choose a teammate, not yourself"]);
+ release(pm.threadId);
+ await expect.poll(async () => (await botState(pm.id))?.busy, { timeout: 15_000 }).toBe(false);
+ } finally {
+ await cleanup([pm.id]);
+ }
+ }, 60_000);
+
+ it("fails a report-back thread whose model can no longer run when its turn comes, instead of running it on the bot's own model", async () => {
+ const pm = await createBot("Pam", "gated");
+ try {
+ const token = await heldTurn(pm, "Ask a different engine, later.");
+ const { task: busy } = (await api("POST", `/api/bots/${pm.id}/tasks`, { title: "Busy" })).body;
+ expect((await api("POST", `/api/bots/${pm.id}/messages`, { text: "Keep busy.", threadId: busy.threadId })).status).toBe(202);
+ await liveToken(busy.threadId);
+ const plain = (await api("GET", "/api/internal/models", undefined, token)).body.engines.find((engine: any) => engine.instanceId === "plain");
+ const selection = { instanceId: "plain", model: plain.models[0].id ?? plain.models[0] };
+ const opened = await api("POST", "/api/internal/threads", { title: "Review: later", message: "Review the diff.", modelSelection: selection, reportBack: true }, token);
+ expect(opened.status, JSON.stringify(opened.body)).toBe(201);
+ const { threadId, requestId } = opened.body;
+ expect(handoffs().find((node) => node.id === requestId)?.status).toBe("queued");
+
+ const { instances } = (await api("GET", "/api/instances")).body;
+ const curious = instances.find((instance: any) => instance.instanceId === "curious");
+ const signedOut = { instanceId: "curious", model: curious.models.default || curious.models.options[0].id };
+ const moved = await api("PATCH", `/api/bots/${pm.id}/tasks/${threadId}`, { modelSelection: signedOut });
+ expect(moved.status, JSON.stringify(moved.body)).toBe(200);
+ release(busy.threadId);
+
+ await expect.poll(() => handoffs().find((node) => node.id === requestId)?.status, { timeout: 15_000 }).toBe("failed");
+ expect(handoffs().find((node) => node.id === requestId)?.result).toMatch(/can't run now: it is signed out\. Nothing ran on another model in its place/);
+ expect(await taskOf(pm.id, threadId)).toMatchObject({ modelSelection: signedOut });
+ expect((await messages(threadId)).filter((message) => message.tool?.name?.startsWith("notice: This thread's model"))).toEqual([]);
+ release(pm.threadId);
+ await expect.poll(async () => (await botState(pm.id))?.busy, { timeout: 15_000 }).toBe(false);
+ } finally {
+ await cleanup([pm.id]);
+ }
+ }, 60_000);
+});
+
describe("coordinate_bots on a teammate", () => {
it.each([1, 2])("runs three requests in the teammate's one thread, one at a time within capacity %i, returns all results, and leaves the person's selected thread untouched", async (capacity) => {
expect((await api("PUT", "/api/config", { threads: { maxConcurrentPerBot: capacity } })).status).toBe(200);
diff --git a/src/locales/en.json b/src/locales/en.json
index 7b837a6bae..c683671328 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -8804,6 +8804,7 @@
"activity.tool.team.listRooms": "List rooms",
"activity.tool.team.listSharedComputers": "List shared computers",
"activity.tool.team.listTeamLibrary": "List team library",
+ "activity.tool.team.listModels": "List models",
"activity.tool.team.listTeamSetup": "List team setup",
"activity.tool.team.listThreads": "List threads",
"activity.tool.team.listTriggerEvents": "List trigger events",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index 7b5cf90b9a..7460677639 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -8780,6 +8780,7 @@
"activity.tool.team.listRooms": "Listar grupos",
"activity.tool.team.listSharedComputers": "Listar computadores compartilhados",
"activity.tool.team.listTeamLibrary": "Listar equipes da biblioteca",
+ "activity.tool.team.listModels": "Listar modelos",
"activity.tool.team.listTeamSetup": "Listar configuração da equipe",
"activity.tool.team.listThreads": "Listar conversas",
"activity.tool.team.listTriggerEvents": "Listar eventos de gatilho",
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index ef45072d57..daec3fb1c8 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -8766,6 +8766,7 @@
"activity.tool.team.listRooms": "列出房間",
"activity.tool.team.listSharedComputers": "列出共用電腦",
"activity.tool.team.listTeamLibrary": "列出團隊資料庫",
+ "activity.tool.team.listModels": "列出模型",
"activity.tool.team.listTeamSetup": "列出團隊設定",
"activity.tool.team.listThreads": "列出對話",
"activity.tool.team.listTriggerEvents": "列出自動化事件",