@devries-cameron20 / t3code-1 / commits / a0f360690d
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

chore(lint): enforce redundantMapError (#25091)

Julius Marminge committed Oct 25, 2026 at 18:18 UTC a0f360690d721db5f8b0d57a861a4d32b4b9e9e6
2 files changed +16 -17
apps/server/src/mcp/OrchestratorMcpService.ts
+15 -17
@@ -2451,24 +2451,22 @@ const make = Effect.gen(function* () {
2451 const cancelOrphan = Effect.gen(function* () {
2452 if (parentTask?.runId == null || !isOrchestrationV2WorkActive(parentTask.status))
2453 return false;
2454 - yield* threadManagement
2455 - .dispatch({
2456 - type: "subagent.stop",
2457 - commandId: stableCommandId({
2458 - scope,
2459 - requestKey: key,
2460 - operation: "cancel-task-orphan",
2461 - }),
2462 - threadId: scope.thread.threadId,
2463 - runId: parentTask.runId,
2464 - subagentId: parentTask.id,
2465 - })
2466 - .pipe(Effect.mapError(threadManagementFailure));
2467 - const { subagents } = yield* threadManagement
2468 - .getThreadRecords(scope.thread.threadId, ["subagents"])
2469 - .pipe(Effect.mapError(threadManagementFailure));
2454 + yield* threadManagement.dispatch({
2455 + type: "subagent.stop",
2456 + commandId: stableCommandId({
2457 + scope,
2458 + requestKey: key,
2459 + operation: "cancel-task-orphan",
2460 + }),
2461 + threadId: scope.thread.threadId,
2462 + runId: parentTask.runId,
2463 + subagentId: parentTask.id,
2464 + });
2465 + const { subagents } = yield* threadManagement.getThreadRecords(scope.thread.threadId, [
2466 + "subagents",
2467 + ]);
2468 return subagents.some((task) => task.id === input.taskId && task.status === "cancelled");
2471 - });
2469 + }).pipe(Effect.mapError(threadManagementFailure));
2470 if (isTerminalTaskStatus(current.status)) {
2471 // The child can still run work for another turn, so it is stopped either way.
2472 yield* stopWithinLimit;
tsconfig.base.json
+1
@@ -24,6 +24,7 @@
24 "namespaceImportPackages": ["@effect/platform-node", "effect"],
25 "effectFn": ["span", "inferred-span", "suggested-span"],
26 "diagnosticSeverity": {
27 + "redundantMapError": "error",
28 "optionMatchToFromOption": "error",
29 "catchToIgnore": "error",
30 "unnecessaryEffectGen": "error",