Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 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
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 @@ -131,6 +131,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 @@ -162,7 +163,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 @@ -61,7 +61,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 @@ -128,12 +128,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
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -5366,5 +5366,6 @@
"ad208e3e32c85029": "Alle ausblenden",
"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."
"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"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5367,5 +5367,6 @@
"ad208e3e32c85029": "Hide all",
"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."
"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"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5360,5 +5360,6 @@
"ad208e3e32c85029": "Ocultar todo",
"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."
"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"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5360,5 +5360,6 @@
"ad208e3e32c85029": "Tout masquer",
"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."
"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"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -5342,5 +5342,6 @@
"ad208e3e32c85029": "すべて非表示",
"3328503592789bed": "Zen",
"856812e7e1fc445e": "チャット内のツール呼び出し",
"8d545d54c0a9e950": "エージェントが実行するコマンド、編集、検索を非表示にします。「成功したものを非表示」では失敗は表示されます。Zen では最終的な回答だけを表示します。承認、質問、エラーは常に表示されます。"
"8d545d54c0a9e950": "エージェントが実行するコマンド、編集、検索を非表示にします。「成功したものを非表示」では失敗は表示されます。Zen では最終的な回答だけを表示します。承認、質問、エラーは常に表示されます。",
"26ce83a4d282d42d": "起動中"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -5346,5 +5346,6 @@
"ad208e3e32c85029": "모두 숨기기",
"3328503592789bed": "Zen",
"856812e7e1fc445e": "채팅의 도구 호출",
"8d545d54c0a9e950": "에이전트가 실행하는 명령, 편집, 검색을 숨깁니다. 성공한 항목 숨기기는 실패를 남겨 둡니다. Zen은 최종 답변만 표시합니다. 승인, 질문, 오류는 항상 표시됩니다."
"8d545d54c0a9e950": "에이전트가 실행하는 명령, 편집, 검색을 숨깁니다. 성공한 항목 숨기기는 실패를 남겨 둡니다. Zen은 최종 답변만 표시합니다. 승인, 질문, 오류는 항상 표시됩니다.",
"26ce83a4d282d42d": "시작 중"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -5360,5 +5360,6 @@
"ad208e3e32c85029": "Ocultar todas",
"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."
"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"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -5440,5 +5440,6 @@
"ad208e3e32c85029": "Скрывать все",
"3328503592789bed": "Дзен",
"856812e7e1fc445e": "Вызовы инструментов в чате",
"8d545d54c0a9e950": "Скрывать команды, правки и поиски, которые выполняют агенты. «Скрывать успешные» оставляет ошибки. «Дзен» показывает только итоговые ответы. Запросы подтверждения, вопросы и ошибки показываются всегда."
"8d545d54c0a9e950": "Скрывать команды, правки и поиски, которые выполняют агенты. «Скрывать успешные» оставляет ошибки. «Дзен» показывает только итоговые ответы. Запросы подтверждения, вопросы и ошибки показываются всегда.",
"26ce83a4d282d42d": "Запуск"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -5366,5 +5366,6 @@
"ad208e3e32c85029": "Dölj alla",
"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."
"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"
}
3 changes: 2 additions & 1 deletion apps/mobile/src/i18n/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -5351,5 +5351,6 @@
"ad208e3e32c85029": "全部隐藏",
"3328503592789bed": "专注模式",
"856812e7e1fc445e": "聊天中的工具调用",
"8d545d54c0a9e950": "隐藏智能体执行的命令、编辑和搜索。“隐藏成功的调用”仍保留失败项;“专注模式”仅显示最终回答。审批、提问和错误始终显示。"
"8d545d54c0a9e950": "隐藏智能体执行的命令、编辑和搜索。“隐藏成功的调用”仍保留失败项;“专注模式”仅显示最终回答。审批、提问和错误始终显示。",
"26ce83a4d282d42d": "正在启动"
}
23 changes: 21 additions & 2 deletions apps/server/src/mcp/OrchestratorMcpService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2148,8 +2148,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 @@ -64,6 +64,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 @@ -137,6 +138,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 @@ -1135,6 +1148,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 @@ -42,6 +42,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 @@ -448,6 +450,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