Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5d62cde
fix(server): recover remote delegated launches after source restart
Lenoridev Nov 2, 2026
39278ad
fix(server): use Node hashing with pinned Effect crypto
Lenoridev Nov 3, 2026
0ae7779
fix(server): retain remote task IDs across deferred launches
Lenoridev Nov 3, 2026
bace21a
fix(server): stop retrying remote launches for missing projects
Lenoridev Nov 3, 2026
b8c828a
fix(server): stop remote tasks with their parent thread
maria-rcks Nov 3, 2026
434c355
fix(clients): show current remote launch recovery warnings
maria-rcks Nov 3, 2026
8c478af
fix(server): preserve recovery warnings across repeated stops
maria-rcks Nov 3, 2026
1217268
Merge remote-tracking branch 'github/main' into pr-30249
maria-rcks Nov 6, 2026
bc593f7
fix(mobile): use live remote child for grouped subagent avatars
maria-rcks Nov 6, 2026
567ba75
fix(server): keep launch identity when a peer link is relabeled
maria-rcks Nov 6, 2026
25f9788
Merge remote-tracking branch 'github/main' into pr-30249
maria-rcks Nov 10, 2026
f4be834
Merge remote-tracking branch 'origin/main' into fix/remote-launch-rec…
juliusmarminge Nov 11, 2026
c53694d
test(server): trim remote launch recovery tests to regressions
juliusmarminge Nov 11, 2026
5def361
fix(server): leave inherited modes to the remote destination
juliusmarminge Nov 11, 2026
f491a64
fix(server): a refused first remote launch reports no uncertainty
juliusmarminge Nov 11, 2026
bba0b92
fix(server): return definite remote launch refusals
Lenoridev Nov 12, 2026
2a8cb70
Merge remote-tracking branch 'origin/main' into fix/remote-launch-rec…
Lenoridev Nov 12, 2026
eb3c8f3
fix(web): skip unattached remote tasks in response links
Lenoridev Nov 12, 2026
f6d072b
Merge remote-tracking branch 'origin/main' into fix/remote-launch-rec…
Lenoridev Nov 12, 2026
ec196dd
Merge remote-tracking branch 'origin/main' into fix/remote-launch-rec…
Lenoridev Nov 13, 2026
1c5a110
Merge remote-tracking branch 'origin/main' into fix/remote-launch-rec…
Lenoridev Nov 14, 2026
bef0bfc
Merge remote-tracking branch 'origin/main' into fix/remote-launch-rec…
Lenoridev Nov 14, 2026
fd5c66f
Merge remote-tracking branch 'origin/main' into fix/remote-launch-rec…
Lenoridev Nov 15, 2026
eadac87
Merge main and preserve executed model in remote completion
Lenoridev Nov 15, 2026
4b5870b
Merge main translations while preserving pending remote launch presen…
Lenoridev Nov 18, 2026
df9d442
fix: validate pending remote status and complete launch translations
Lenoridev Nov 18, 2026
f775f80
Merge main while retaining remote recovery and thread read tests
Lenoridev Nov 19, 2026
f58cad2
Merge main peer expiry renewal coverage with recovery tests
Lenoridev Nov 20, 2026
c494729
Merge linked thread readers while guarding pending remote launches
Lenoridev Nov 20, 2026
9381d8f
Merge side panel thread triggers with pending launch guards
Lenoridev Nov 20, 2026
05aaffa
Merge newest peer thread reads while retaining recovery link identity
Lenoridev Nov 21, 2026
1029ac8
Merge main queue translations while retaining launch status messages
Lenoridev Nov 21, 2026
afe5ee2
Merge reordered catalogs while preserving remote launch translations
Lenoridev Nov 22, 2026
f87efd8
Merge peer session unlink results while retaining recovery link identity
Lenoridev Nov 22, 2026
cc2b778
Merge account connection catalogs while retaining launch messages
Lenoridev Nov 23, 2026
be9105f
Merge cursorless peer reads while preserving recovery link identity
Lenoridev Nov 23, 2026
fff49ca
Merge remote task elapsed display while preserving launch status
Lenoridev Nov 24, 2026
329c85f
Merge idle child stop coverage while retaining remote stop cases
Lenoridev Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,50 @@
import * as DateTime from "effect/DateTime";
import { describe, expect, it } from "vite-plus/test";
import { subagentCardElapsed } from "./subagent-card-presentation";
import { resolveSubagentRowPresentation, subagentThreadTarget } from "./threadAgentsPresentation";

describe("subagent card", () => {
const start = DateTime.makeUnsafe("2026-09-21T12:00:00Z");
const end = DateTime.makeUnsafe("2026-09-21T12:01:00Z");
const later = DateTime.makeUnsafe("2026-09-21T12:02:00Z");
const done = { status: "completed" as const, startedAt: start, completedAt: end };

it("keeps a pending remote launch visible without opening a nonexistent thread", () => {
const pending = {
title: null,
prompt: "Audit the timestamps",
status: "running" as const,
result: null,
childThreadId: null,
remoteChild: { environmentId: "environment-box" as never, label: "Box" },
};
expect(resolveSubagentRowPresentation(pending, true)).toMatchObject({
runsOn: "Box",
statusLabel: "Launching",
canOpenThread: false,
});
expect(
subagentThreadTarget(
pending,
"environment-here" as never,
() => ({ connected: true }),
() => true,
),
).toBeNull();
const launchError = "Launch unconfirmed; work may still be running on Box.";
expect(
resolveSubagentRowPresentation(
{
...pending,
status: "cancelled",
result: "Cancelled.",
remoteChild: { ...pending.remoteChild, launchError },
},
true,
),
).toMatchObject({ statusLabel: "Cancelled", detail: launchError, canOpenThread: false });
});

it("counts live work but never uses a settled agent's age as its duration", () => {
const unfinished = { ...done, completedAt: null };
expect(subagentCardElapsed([unfinished], DateTime.toEpochMillis(later))).toBeNull();
Expand Down
3 changes: 2 additions & 1 deletion apps/mobile/src/features/threads/thread-subagent-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export function ThreadSubagentGroup(props: {
completedAt: live?.completedAt ?? item.completedAt,
result: live?.result ?? item.result,
progress: live?.progress ?? item.progress,
remoteChild: live?.remoteChild ?? item.remoteChild,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
model: live?.model ?? null,
modelSelection: live?.modelSelection,
};
Expand Down Expand Up @@ -163,7 +164,7 @@ export function ThreadSubagentGroup(props: {
<View className="flex-row items-center">
{agents.slice(0, 3).map((agent, index) => (
<View key={agent.item.id} style={{ marginLeft: index === 0 ? 0 : -7 }}>
<SubagentAvatar item={agent.item} config={configOf(agent.item)} />
<SubagentAvatar item={agent} config={configOf(agent)} />
</View>
))}
{agents.length > 3 ? (
Expand Down
15 changes: 11 additions & 4 deletions apps/mobile/src/features/threads/threadAgentsPresentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function subagentThreadTarget(
return { environmentId, threadId: subagent.childThreadId };
}
const remote = subagent.remoteChild;
if (remote === undefined) return null;
if (remote?.threadId === undefined) return null;
const target = { environmentId: remote.environmentId, threadId: remote.threadId };
const open = resolveLinkedThreadOpen({
environmentId: remote.environmentId,
Expand Down Expand Up @@ -125,12 +125,19 @@ export function resolveSubagentRowPresentation(
const live = isActiveSubagentStatus(subagent.status);
return {
title: rowTitle(subagent, resolve),
detail: subagentDetailPreview(subagent),
statusLabel: rowStatusLabel(subagent.status, resolve),
detail: subagentDetailPreview({
...subagent,
result: subagent.remoteChild?.launchError ?? subagent.result,
}),
statusLabel:
live && subagent.remoteChild !== undefined && subagent.remoteChild.threadId === undefined
? resolve(msg("Launching", { $context: "agent status" }))
: rowStatusLabel(subagent.status, resolve),
tone: rowTone(subagent.status),
live,
canOpenThread:
subagent.childThreadId !== null || (subagent.remoteChild !== undefined && canOpenRemote),
subagent.childThreadId !== null ||
(subagent.remoteChild?.threadId !== undefined && canOpenRemote),
runsOn: subagent.remoteChild?.label ?? null,
};
}
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -5613,6 +5613,7 @@
"3328503592789bed": "Zen",
"856812e7e1fc445e": "Tool-Aufrufe im Chat",
"8d545d54c0a9e950": "Die Befehle, Bearbeitungen und Suchen ausblenden, die Agenten ausführen. „Erfolgreiche ausblenden“ behält Fehler. „Zen“ zeigt nur endgültige Antworten. Genehmigungen, Fragen und Fehler werden immer angezeigt.",
"26ce83a4d282d42d": "Wird gestartet",
"99d51127f573296b": "Weiteres Konto",
"8ec2c57414669b79": "Verbinde einen zweiten {tracker}-Workspace oder -Nutzer.",
"892f08d21b8e48a9": "{layers} per {kind, select, squash {Squash} merge {Merge} rebase {Rebase} fastForward {Fast-Forward} other {{method}}} in {base} mergen, sobald die Anforderungen erfüllt sind. Das kann sofort passieren."
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5615,6 +5615,7 @@
"3328503592789bed": "Zen",
"856812e7e1fc445e": "Tool calls in chat",
"8d545d54c0a9e950": "Hide the commands, edits, and searches agents run. Hide successful keeps failures. Zen shows only final answers. Approvals, questions, and errors always show.",
"26ce83a4d282d42d": "Launching",
"99d51127f573296b": "Another account",
"8ec2c57414669b79": "Connect a second {tracker} workspace or user.",
"892f08d21b8e48a9": "Merge {layers} into {base} using {kind, select, squash {squash} merge {merge} rebase {rebase} fastForward {fast-forward} other {{method}}} once their requirements are met. This may happen immediately."
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5607,6 +5607,7 @@
"3328503592789bed": "Zen",
"856812e7e1fc445e": "Llamadas a herramientas en el chat",
"8d545d54c0a9e950": "Oculta los comandos, ediciones y búsquedas que ejecutan los agentes. Ocultar las correctas mantiene los fallos. Zen solo muestra las respuestas finales. Las aprobaciones, preguntas y errores siempre se muestran.",
"26ce83a4d282d42d": "Iniciando",
"99d51127f573296b": "Otra cuenta",
"8ec2c57414669b79": "Conecta un segundo espacio de trabajo o usuario de {tracker}.",
"892f08d21b8e48a9": "Fusionar {layers} en {base} con {kind, select, squash {squash} merge {merge} rebase {rebase} fastForward {fast-forward} other {{method}}} cuando se cumplan sus requisitos. Puede ocurrir de inmediato."
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5607,6 +5607,7 @@
"3328503592789bed": "Zen",
"856812e7e1fc445e": "Appels d’outils dans la discussion",
"8d545d54c0a9e950": "Masque les commandes, modifications et recherches lancées par les agents. Masquer les réussis garde les échecs. Zen n’affiche que les réponses finales. Les approbations, questions et erreurs s’affichent toujours.",
"26ce83a4d282d42d": "Démarrage",
"99d51127f573296b": "Autre compte",
"8ec2c57414669b79": "Connectez un second espace de travail ou utilisateur {tracker}.",
"892f08d21b8e48a9": "Fusionner {layers} dans {base} avec {kind, select, squash {squash} merge {merge} rebase {rebase} fastForward {fast-forward} other {{method}}} dès que leurs conditions sont remplies. Cela peut se produire immédiatement."
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -5587,6 +5587,7 @@
"3328503592789bed": "Zen",
"856812e7e1fc445e": "チャット内のツール呼び出し",
"8d545d54c0a9e950": "エージェントが実行するコマンド、編集、検索を非表示にします。「成功したものを非表示」では失敗は表示されます。Zen では最終的な回答だけを表示します。承認、質問、エラーは常に表示されます。",
"26ce83a4d282d42d": "起動中",
"99d51127f573296b": "別のアカウント",
"8ec2c57414669b79": "2つ目の {tracker} ワークスペースまたはユーザーを接続します。",
"892f08d21b8e48a9": "要件が満たされたら、{layers} を{kind, select, squash {スカッシュ} merge {マージ} rebase {リベース} fastForward {早送り} other {{method}}}で {base} にマージします。すぐにマージされる場合があります。"
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -5593,6 +5593,7 @@
"3328503592789bed": "Zen",
"856812e7e1fc445e": "채팅의 도구 호출",
"8d545d54c0a9e950": "에이전트가 실행하는 명령, 편집, 검색을 숨깁니다. 성공한 항목 숨기기는 실패를 남겨 둡니다. Zen은 최종 답변만 표시합니다. 승인, 질문, 오류는 항상 표시됩니다.",
"26ce83a4d282d42d": "시작 중",
"99d51127f573296b": "다른 계정",
"8ec2c57414669b79": "두 번째 {tracker} 워크스페이스 또는 사용자를 연결합니다.",
"892f08d21b8e48a9": "요구 사항이 충족되면 {layers}을(를) {kind, select, squash {스쿼시} merge {병합} rebase {리베이스} fastForward {빨리 감기} other {{method}}} 방식으로 {base}에 병합합니다. 바로 병합될 수도 있습니다."
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -5607,6 +5607,7 @@
"3328503592789bed": "Zen",
"856812e7e1fc445e": "Chamadas de ferramentas no chat",
"8d545d54c0a9e950": "Oculta os comandos, edições e pesquisas que os agentes executam. \"Ocultar bem-sucedidas\" mantém as falhas. Zen mostra só as respostas finais. Aprovações, perguntas e erros sempre aparecem.",
"26ce83a4d282d42d": "Iniciando",
"99d51127f573296b": "Outra conta",
"8ec2c57414669b79": "Conecte um segundo espaço de trabalho ou usuário do {tracker}.",
"892f08d21b8e48a9": "Mesclar {layers} em {base} usando {kind, select, squash {squash} merge {merge} rebase {rebase} fastForward {fast-forward} other {{method}}} quando os requisitos forem atendidos. Isso pode acontecer imediatamente."
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -5687,6 +5687,7 @@
"3328503592789bed": "Дзен",
"856812e7e1fc445e": "Вызовы инструментов в чате",
"8d545d54c0a9e950": "Скрывать команды, правки и поиски, которые выполняют агенты. «Скрывать успешные» оставляет ошибки. «Дзен» показывает только итоговые ответы. Запросы подтверждения, вопросы и ошибки показываются всегда.",
"26ce83a4d282d42d": "Запуск",
"99d51127f573296b": "Другой аккаунт",
"8ec2c57414669b79": "Подключите второе рабочее пространство или пользователя {tracker}.",
"892f08d21b8e48a9": "Слить {layers} в {base} методом {kind, select, squash {squash} merge {merge} rebase {rebase} fastForward {fast-forward} other {{method}}}, когда будут выполнены требования. Это может произойти сразу."
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -5613,6 +5613,7 @@
"3328503592789bed": "Zen",
"856812e7e1fc445e": "Verktygsanrop i chatten",
"8d545d54c0a9e950": "Dölj kommandon, redigeringar och sökningar som agenter kör. Dölj lyckade behåller misslyckanden. Zen visar bara slutliga svar. Godkännanden, frågor och fel visas alltid.",
"26ce83a4d282d42d": "Startar",
"99d51127f573296b": "Ett konto till",
"8ec2c57414669b79": "Anslut en andra {tracker}-arbetsyta eller användare.",
"892f08d21b8e48a9": "Merga {layers} in i {base} med {kind, select, squash {squash} merge {merge} rebase {rebase} fastForward {fast-forward} other {{method}}} när kraven är uppfyllda. Det kan ske direkt."
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/i18n/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -5597,6 +5597,7 @@
"3328503592789bed": "专注模式",
"856812e7e1fc445e": "聊天中的工具调用",
"8d545d54c0a9e950": "隐藏智能体执行的命令、编辑和搜索。“隐藏成功的调用”仍保留失败项;“专注模式”仅显示最终回答。审批、提问和错误始终显示。",
"26ce83a4d282d42d": "正在启动",
"99d51127f573296b": "其他账号",
"8ec2c57414669b79": "连接第二个 {tracker} 工作区或用户。",
"892f08d21b8e48a9": "满足要求时使用{kind, select, squash {压缩合并} merge {合并} rebase {变基} fastForward {快进} other {{method}}}方式将 {layers} 合并到 {base}。这可能会立即发生。"
Expand Down
23 changes: 21 additions & 2 deletions apps/server/src/mcp/OrchestratorMcpService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2211,8 +2211,27 @@ const make = Effect.gen(function* () {
...(task.remoteChild === undefined
? {}
: {
remoteChild: task.remoteChild,
link: formatThreadLink(task.remoteChild, task.remoteChild.title),
...(task.remoteChild.threadId === undefined
? {}
: {
link: formatThreadLink(
{
environmentId: task.remoteChild.environmentId,
threadId: task.remoteChild.threadId,
},
task.remoteChild.title,
),
}),
remoteChild: {
environmentId: task.remoteChild.environmentId,
label: task.remoteChild.label,
...(task.remoteChild.launchError === undefined
? {}
: { launchError: task.remoteChild.launchError }),
...(task.remoteChild.threadId === undefined
? {}
: { threadId: task.remoteChild.threadId }),
},
}),
childRunId: null,
childNodeId: task.id,
Expand Down
38 changes: 38 additions & 0 deletions apps/server/src/mcp/toolkits/project/handlers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const clientLaunchHarness = (input: {
readonly hostedAppUrl?: string;
/** The orchestrator refuses the new thread's mode, as under a managed ceiling. */
readonly refusedByCeiling?: true;
readonly launchFailure?: "missing" | "lookup";
}) => {
const projectId = ProjectId.make("project:client-target");
const modelSelection = {
Expand Down Expand Up @@ -139,6 +140,18 @@ const clientLaunchHarness = (input: {
checkWorktreeBase: input.checkWorktreeBase ?? (() => Effect.void),
launch: (launch) => {
input.launched.push(launch);
if (input.launchFailure)
return Effect.fail(
new ThreadLaunch.ThreadLaunchError({
operation: "resolve-project",
commandId: launch.commandId,
projectId: launch.projectId,
cause:
input.launchFailure === "missing"
? new Project.ProjectNotFoundError({ projectId: launch.projectId })
: new Error("Project storage unavailable"),
}),
);
if (input.refusedByCeiling) {
return Effect.fail(
new ThreadLaunch.ThreadLaunchError({
Expand Down Expand Up @@ -1166,6 +1179,31 @@ it.effect("deleting a project through MCP also discards its clone record", () =>
}),
);

it.effect.each(["missing", "lookup"] as const)(
"classifies %s project launch failures",
(launchFailure) =>
Effect.gen(function* () {
const { projectId, dependencies } = clientLaunchHarness({
runtimeModeCeiling: "full-access",
launched: [],
launchFailure,
});
const toolkit = yield* ProjectToolkit.pipe(
Effect.provide(
McpToolAccess.HandlersLayer.layer(ProjectHandlers.layer).pipe(
Layer.provide(dependencies),
),
),
);
const result = yield* toolkit
.handle("t3_thread_launch", { projectId, title: "Missing project" })
.pipe(Stream.unwrap, Stream.runCollect, Effect.provide(dependencies));
expect(result.at(-1)?.result).toMatchObject({
code: launchFailure === "missing" ? "invalid_request" : "orchestration_error",
});
}),
);

it.effect("an agent cannot delete the built-in scratch project, even with force", () =>
Effect.gen(function* () {
const deleted: Array<ProjectId> = [];
Expand Down
8 changes: 8 additions & 0 deletions apps/server/src/mcp/toolkits/project/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ import * as OrchestrationMcp from "../../OrchestratorMcpService.ts";
import { newCommandId, readCaller, resolveProjectId, unavailable } from "../../threadAccess.ts";
import { ProjectToolkit } from "./tools.ts";

const isProjectNotFoundError = Schema.is(Project.ProjectNotFoundError);

const isAboveCeilingError = Schema.is(OrchestratorRuntimeModeAboveCeilingError);

function projectFailure(error: Project.ProjectServiceError) {
Expand Down Expand Up @@ -490,6 +492,12 @@ export const layer = McpToolAccess.toLayer(ProjectToolkit, {
message: error.message,
});
}
if (error._tag === "ThreadLaunchError" && isProjectNotFoundError(error.cause)) {
return new OrchestratorMcpFailure({
code: "invalid_request",
message: error.cause.message,
});
}
// The administrator's ceiling refuses the mode; say so rather than "unavailable".
if (error._tag === "ThreadLaunchError" && isAboveCeilingError(error.cause)) {
return new OrchestratorMcpFailure({
Expand Down
Loading
Loading