@sideboard-ai/core 0.1.204 → 0.1.206

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/agents/cursor-runner.js +1 -1
  2. package/dist/{agents-67K4BQFJ.js → agents-5SDF6KCI.js} +4 -4
  3. package/dist/{agents-BVOJNHV6.js → agents-UW2BUEDH.js} +5 -5
  4. package/dist/{chunk-KZ7PI7FE.js → chunk-4YXOCLJU.js} +5 -0
  5. package/dist/{chunk-WF33LOP4.js → chunk-64L62EZY.js} +21 -9
  6. package/dist/{chunk-QUW5D62C.js → chunk-6F2L3NTL.js} +1 -1
  7. package/dist/{chunk-DFUES6QU.js → chunk-ARR4OGLY.js} +1 -0
  8. package/dist/{chunk-INNLWYXW.js → chunk-DWGEBZ3C.js} +1 -0
  9. package/dist/{chunk-WVATAIF4.js → chunk-EJX62RSX.js} +1 -1
  10. package/dist/{chunk-YOSTWSNC.js → chunk-FX3P25X2.js} +17 -10
  11. package/dist/{chunk-VIPA75ZA.js → chunk-GD2WKFFA.js} +2 -2
  12. package/dist/{chunk-FO45DMJ5.js → chunk-IQEBC3LD.js} +41 -21
  13. package/dist/{chunk-5SMS6QTO.js → chunk-R7QI3O74.js} +2 -2
  14. package/dist/{chunk-ULZLWQBS.js → chunk-SCIMSW7C.js} +39 -19
  15. package/dist/{coordinator-prompt-WEPXXLLX.js → coordinator-prompt-6Q5NDWOC.js} +3 -3
  16. package/dist/{coordinator-prompt-NPT555BO.js → coordinator-prompt-EWHEK24X.js} +3 -3
  17. package/dist/{global-workspace-NSILADOM.js → global-workspace-2GMALKKE.js} +3 -3
  18. package/dist/{global-workspace-2I2T7FL5.js → global-workspace-KHSZZKIH.js} +3 -3
  19. package/dist/index.cjs +43 -12
  20. package/dist/index.d.cts +11 -0
  21. package/dist/index.d.ts +11 -0
  22. package/dist/index.js +6 -6
  23. package/dist/mcp/run-stdio.cjs +43 -12
  24. package/dist/mcp/run-stdio.js +5 -5
  25. package/dist/{orchestrator-CMAVNELS.js → orchestrator-NXZ5NDAM.js} +6 -6
  26. package/dist/{orchestrator-I7GFXLHF.js → orchestrator-WIL5WFBL.js} +5 -5
  27. package/dist/{thread-store-ZGVWPVHP.js → thread-store-LS2T6RVH.js} +1 -1
  28. package/dist/{thread-store-2SS5V5CN.js → thread-store-XGYWXR2P.js} +1 -1
  29. package/dist/{workspaces-BOC6M7BW.js → workspaces-4CBMCP6N.js} +3 -3
  30. package/dist/{workspaces-RFGZBUAR.js → workspaces-6RGWGUFK.js} +3 -3
  31. package/dist/{worktree-G3ZLM4DC.js → worktree-2U7SZBO2.js} +2 -2
  32. package/dist/{worktree-WSUQMMK4.js → worktree-SPH7Q2S6.js} +2 -2
  33. package/package.json +1 -1
@@ -13,7 +13,7 @@ import {
13
13
  fetchCursorTurnCostUsd,
14
14
  formatUnknownDetail,
15
15
  looksLikeCursorHttp2StreamClose
16
- } from "../chunk-KZ7PI7FE.js";
16
+ } from "../chunk-4YXOCLJU.js";
17
17
  import {
18
18
  dropNestedElectronEnvFromProcess
19
19
  } from "../chunk-4TR3HZFT.js";
@@ -50,14 +50,14 @@ import {
50
50
  resolveQuotaFallbackAgent,
51
51
  turnCostUsdFromCursorUsage,
52
52
  whichOnPath
53
- } from "./chunk-WF33LOP4.js";
54
- import "./chunk-5SMS6QTO.js";
53
+ } from "./chunk-64L62EZY.js";
54
+ import "./chunk-R7QI3O74.js";
55
55
  import "./chunk-3OHR73VK.js";
56
56
  import "./chunk-Y4MIXGPA.js";
57
57
  import "./chunk-VKQGAWHY.js";
58
- import "./chunk-QUW5D62C.js";
58
+ import "./chunk-6F2L3NTL.js";
59
59
  import "./chunk-D6JWYJ4P.js";
60
- import "./chunk-INNLWYXW.js";
60
+ import "./chunk-DWGEBZ3C.js";
61
61
  import "./chunk-SYFVUF2C.js";
62
62
  import {
63
63
  conductorBundledBinDir,
@@ -44,9 +44,9 @@ import {
44
44
  resolveLoginCommand,
45
45
  resolveQuotaFallbackAgent,
46
46
  whichOnPath
47
- } from "./chunk-YOSTWSNC.js";
48
- import "./chunk-VIPA75ZA.js";
49
- import "./chunk-WVATAIF4.js";
47
+ } from "./chunk-FX3P25X2.js";
48
+ import "./chunk-GD2WKFFA.js";
49
+ import "./chunk-EJX62RSX.js";
50
50
  import "./chunk-6K64FJDD.js";
51
51
  import "./chunk-QQKDGPUI.js";
52
52
  import "./chunk-SALM35KD.js";
@@ -57,7 +57,7 @@ import {
57
57
  parseCursorRunnerLine,
58
58
  preferredCursorCostCents,
59
59
  turnCostUsdFromCursorUsage
60
- } from "./chunk-KZ7PI7FE.js";
60
+ } from "./chunk-4YXOCLJU.js";
61
61
  import {
62
62
  ORCHESTRATOR_AGENT_KINDS,
63
63
  assertOrchestratorCapableAgent,
@@ -67,7 +67,7 @@ import {
67
67
  import "./chunk-4TR3HZFT.js";
68
68
  import "./chunk-WDRMZKVB.js";
69
69
  import "./chunk-JT7R45JB.js";
70
- import "./chunk-DFUES6QU.js";
70
+ import "./chunk-ARR4OGLY.js";
71
71
  import "./chunk-77WWLBCI.js";
72
72
  import "./chunk-WFUDY6PC.js";
73
73
  import {
@@ -324,6 +324,10 @@ function turnFailChatText(opts) {
324
324
 
325
325
  ${fail}`;
326
326
  }
327
+ function shouldRetryCodexPluginIsolate(detail, opts) {
328
+ if (opts?.alreadyIsolated) return false;
329
+ return looksLikeCodexMcpError(detail);
330
+ }
327
331
  function looksLikeCodexMcpError(text) {
328
332
  const t = text.trim().toLowerCase();
329
333
  if (!t) return false;
@@ -1134,6 +1138,7 @@ export {
1134
1138
  looksLikeAgentFailureMessage,
1135
1139
  fallbackTurnFailDetail,
1136
1140
  turnFailChatText,
1141
+ shouldRetryCodexPluginIsolate,
1137
1142
  shouldFeedErrorBackToAgent,
1138
1143
  formatAgentErrorContinuePrompt,
1139
1144
  formatTurnExitError,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  isOrchestratorThread
5
- } from "./chunk-5SMS6QTO.js";
5
+ } from "./chunk-R7QI3O74.js";
6
6
  import {
7
7
  applyConnectedTeamToCli,
8
8
  brightsyMcpServerName,
@@ -20,7 +20,7 @@ import {
20
20
  mergeAgentGitAuthEnv,
21
21
  resolveAgentGitAuthEnv,
22
22
  resolveCodexGitWritableRoots
23
- } from "./chunk-QUW5D62C.js";
23
+ } from "./chunk-6F2L3NTL.js";
24
24
  import {
25
25
  enrichPathWithNpmGlobalBin,
26
26
  isConductorBundledCli,
@@ -470,6 +470,10 @@ function turnFailChatText(opts) {
470
470
 
471
471
  ${fail}`;
472
472
  }
473
+ function shouldRetryCodexPluginIsolate(detail, opts) {
474
+ if (opts?.alreadyIsolated) return false;
475
+ return looksLikeCodexMcpError(detail);
476
+ }
473
477
  function looksLikeCodexMcpError(text) {
474
478
  const t = text.trim().toLowerCase();
475
479
  if (!t) return false;
@@ -528,13 +532,18 @@ function normalizeTurnInput(input) {
528
532
  return {
529
533
  prompt: input.prompt,
530
534
  cachedPrefix: input.cachedPrefix?.trim() || void 0,
531
- systemPrompt: input.systemPrompt?.trim() || void 0
535
+ systemPrompt: input.systemPrompt?.trim() || void 0,
536
+ ...input.isolateCodexPlugins ? { isolateCodexPlugins: true } : {}
532
537
  };
533
538
  }
534
539
  function dropCachedPrefixOnResume(input, sessionId) {
535
540
  const turn = normalizeTurnInput(input);
536
541
  if (sessionId) {
537
- return turn.systemPrompt ? { prompt: turn.prompt, systemPrompt: turn.systemPrompt } : { prompt: turn.prompt };
542
+ return {
543
+ prompt: turn.prompt,
544
+ ...turn.systemPrompt ? { systemPrompt: turn.systemPrompt } : {},
545
+ ...turn.isolateCodexPlugins ? { isolateCodexPlugins: true } : {}
546
+ };
538
547
  }
539
548
  return turn;
540
549
  }
@@ -2441,7 +2450,7 @@ var claudeAdapter = {
2441
2450
  );
2442
2451
  }
2443
2452
  const mode = permissionMode(thread);
2444
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-2I2T7FL5.js");
2453
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-KHSZZKIH.js");
2445
2454
  const isOrchestrator = isOrchestratorThread2(thread);
2446
2455
  const injectedServers = await buildInjectedMcpServers({
2447
2456
  includeSideboard: true,
@@ -2781,9 +2790,7 @@ function toCodexUnattendedAppsArgs() {
2781
2790
  "-c",
2782
2791
  "apps.posthog.enabled=false",
2783
2792
  "-c",
2784
- "features.plugins=false",
2785
- "-c",
2786
- "mcp_servers.posthog.enabled=false"
2793
+ "features.plugins=false"
2787
2794
  ];
2788
2795
  }
2789
2796
 
@@ -2952,8 +2959,12 @@ var codexAdapter = {
2952
2959
  }),
2953
2960
  orchestratorThreadId: isOrchestrator ? thread.id : null
2954
2961
  });
2962
+ const isolatePlugins = isOrchestrator || Boolean(thread.isolateCodexPlugins) || Boolean(normalizeTurnInput(input).isolateCodexPlugins);
2955
2963
  const mcpOverrides = [
2956
- ...toCodexUnattendedAppsArgs(),
2964
+ // Worktree first try keeps plugins (Claude connectors). Coordinators
2965
+ // isolate. After a fatal plugin MCP, the orchestrator retries with
2966
+ // isolateCodexPlugins so the turn continues. Never invent mcp_servers.posthog.
2967
+ ...isolatePlugins ? toCodexUnattendedAppsArgs() : [],
2957
2968
  ...toCodexMcpConfigArgs(injected),
2958
2969
  ...isOrchestrator ? toCodexDisableUserMcpArgs(
2959
2970
  userMcpNamesToDisable({
@@ -4770,6 +4781,7 @@ export {
4770
4781
  looksLikeAgentFailureMessage,
4771
4782
  fallbackTurnFailDetail,
4772
4783
  turnFailChatText,
4784
+ shouldRetryCodexPluginIsolate,
4773
4785
  shouldFeedErrorBackToAgent,
4774
4786
  formatAgentErrorContinuePrompt,
4775
4787
  formatTurnExitError,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-D6JWYJ4P.js";
6
6
  import {
7
7
  listThreads
8
- } from "./chunk-INNLWYXW.js";
8
+ } from "./chunk-DWGEBZ3C.js";
9
9
  import {
10
10
  ensureWorktreeSideboardIgnored
11
11
  } from "./chunk-SYFVUF2C.js";
@@ -36,6 +36,7 @@ function normalizeThread(raw) {
36
36
  effort: resolveThreadEffort(raw),
37
37
  fast: Boolean(raw.fast),
38
38
  planMode: Boolean(raw.planMode),
39
+ isolateCodexPlugins: raw.isolateCodexPlugins === true ? true : void 0,
39
40
  autonomy: raw.autonomy ?? "default",
40
41
  lastError: raw.lastError ?? null,
41
42
  agentPid: raw.agentPid ?? null,
@@ -38,6 +38,7 @@ function normalizeThread(raw) {
38
38
  effort: resolveThreadEffort(raw),
39
39
  fast: Boolean(raw.fast),
40
40
  planMode: Boolean(raw.planMode),
41
+ isolateCodexPlugins: raw.isolateCodexPlugins === true ? true : void 0,
41
42
  autonomy: raw.autonomy ?? "default",
42
43
  lastError: raw.lastError ?? null,
43
44
  agentPid: raw.agentPid ?? null,
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-QFBBUFD4.js";
11
11
  import {
12
12
  listThreads
13
- } from "./chunk-DFUES6QU.js";
13
+ } from "./chunk-ARR4OGLY.js";
14
14
  import {
15
15
  worktreesRoot
16
16
  } from "./chunk-WFUDY6PC.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-VIPA75ZA.js";
3
+ } from "./chunk-GD2WKFFA.js";
4
4
  import {
5
5
  codexUnattendedGitConfigArgs,
6
6
  mergeAgentGitAuthEnv,
7
7
  resolveAgentGitAuthEnv,
8
8
  resolveCodexGitWritableRoots
9
- } from "./chunk-WVATAIF4.js";
9
+ } from "./chunk-EJX62RSX.js";
10
10
  import {
11
11
  applyConnectedTeamToCli,
12
12
  brightsyMcpServerName,
@@ -33,7 +33,7 @@ import {
33
33
  packagedMcpStdioPath,
34
34
  parseCursorRunnerLine,
35
35
  resolveNodeLaunch
36
- } from "./chunk-KZ7PI7FE.js";
36
+ } from "./chunk-4YXOCLJU.js";
37
37
  import {
38
38
  claudeChromeEnabled,
39
39
  isAbleTimeConnected,
@@ -178,13 +178,18 @@ function normalizeTurnInput(input) {
178
178
  return {
179
179
  prompt: input.prompt,
180
180
  cachedPrefix: input.cachedPrefix?.trim() || void 0,
181
- systemPrompt: input.systemPrompt?.trim() || void 0
181
+ systemPrompt: input.systemPrompt?.trim() || void 0,
182
+ ...input.isolateCodexPlugins ? { isolateCodexPlugins: true } : {}
182
183
  };
183
184
  }
184
185
  function dropCachedPrefixOnResume(input, sessionId) {
185
186
  const turn = normalizeTurnInput(input);
186
187
  if (sessionId) {
187
- return turn.systemPrompt ? { prompt: turn.prompt, systemPrompt: turn.systemPrompt } : { prompt: turn.prompt };
188
+ return {
189
+ prompt: turn.prompt,
190
+ ...turn.systemPrompt ? { systemPrompt: turn.systemPrompt } : {},
191
+ ...turn.isolateCodexPlugins ? { isolateCodexPlugins: true } : {}
192
+ };
188
193
  }
189
194
  return turn;
190
195
  }
@@ -1937,7 +1942,7 @@ var claudeAdapter = {
1937
1942
  );
1938
1943
  }
1939
1944
  const mode = permissionMode(thread);
1940
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-NSILADOM.js");
1945
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-2GMALKKE.js");
1941
1946
  const isOrchestrator = isOrchestratorThread2(thread);
1942
1947
  const injectedServers = await buildInjectedMcpServers({
1943
1948
  includeSideboard: true,
@@ -2341,9 +2346,7 @@ function toCodexUnattendedAppsArgs() {
2341
2346
  "-c",
2342
2347
  "apps.posthog.enabled=false",
2343
2348
  "-c",
2344
- "features.plugins=false",
2345
- "-c",
2346
- "mcp_servers.posthog.enabled=false"
2349
+ "features.plugins=false"
2347
2350
  ];
2348
2351
  }
2349
2352
 
@@ -2512,8 +2515,12 @@ var codexAdapter = {
2512
2515
  }),
2513
2516
  orchestratorThreadId: isOrchestrator ? thread.id : null
2514
2517
  });
2518
+ const isolatePlugins = isOrchestrator || Boolean(thread.isolateCodexPlugins) || Boolean(normalizeTurnInput(input).isolateCodexPlugins);
2515
2519
  const mcpOverrides = [
2516
- ...toCodexUnattendedAppsArgs(),
2520
+ // Worktree first try keeps plugins (Claude connectors). Coordinators
2521
+ // isolate. After a fatal plugin MCP, the orchestrator retries with
2522
+ // isolateCodexPlugins so the turn continues. Never invent mcp_servers.posthog.
2523
+ ...isolatePlugins ? toCodexUnattendedAppsArgs() : [],
2517
2524
  ...toCodexMcpConfigArgs(injected),
2518
2525
  ...isOrchestrator ? toCodexDisableUserMcpArgs(
2519
2526
  userMcpNamesToDisable({
@@ -5,7 +5,7 @@ import {
5
5
  resolveRepoRoot,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-WVATAIF4.js";
8
+ } from "./chunk-EJX62RSX.js";
9
9
  import {
10
10
  ATTACHMENTS_DIR,
11
11
  attachmentsGitignoreBody
@@ -28,7 +28,7 @@ import {
28
28
  listThreads,
29
29
  updateThread,
30
30
  writeThread
31
- } from "./chunk-DFUES6QU.js";
31
+ } from "./chunk-ARR4OGLY.js";
32
32
  import {
33
33
  appDataDir,
34
34
  globalAgentCwd,
@@ -26,7 +26,7 @@ import {
26
26
  stripBrightsyNdjsonNoise,
27
27
  sumUsageList,
28
28
  toolDescription
29
- } from "./chunk-YOSTWSNC.js";
29
+ } from "./chunk-FX3P25X2.js";
30
30
  import {
31
31
  SLACK_REPLY_FORMATTING,
32
32
  addWorkspace,
@@ -49,7 +49,7 @@ import {
49
49
  stageAbsolutePathsAsAttachments,
50
50
  stageBuffersAsAttachments,
51
51
  syncWorkspacesFromThreads
52
- } from "./chunk-VIPA75ZA.js";
52
+ } from "./chunk-GD2WKFFA.js";
53
53
  import {
54
54
  addPrStackLayer,
55
55
  allocateTeamName,
@@ -99,7 +99,7 @@ import {
99
99
  worktreeDisplayLabelForGroup,
100
100
  worktreeNameFromPath,
101
101
  worktreeSlugForTicket
102
- } from "./chunk-WVATAIF4.js";
102
+ } from "./chunk-EJX62RSX.js";
103
103
  import {
104
104
  ATTACHMENTS_DIR,
105
105
  DETACHED_JOBS_DIR,
@@ -127,10 +127,11 @@ import {
127
127
  packagedMcpDir,
128
128
  pushTurnStderr,
129
129
  shouldFeedErrorBackToAgent,
130
+ shouldRetryCodexPluginIsolate,
130
131
  shouldRetryFailedAgentTurn,
131
132
  summarizeTurnStderr,
132
133
  turnFailChatText
133
- } from "./chunk-KZ7PI7FE.js";
134
+ } from "./chunk-4YXOCLJU.js";
134
135
  import {
135
136
  assertOrchestratorCapableAgent,
136
137
  childEnvWithAppSettings,
@@ -180,7 +181,7 @@ import {
180
181
  updateThread,
181
182
  withThreadLock,
182
183
  writeThread
183
- } from "./chunk-DFUES6QU.js";
184
+ } from "./chunk-ARR4OGLY.js";
184
185
  import {
185
186
  appDataDir,
186
187
  findConventionSetup,
@@ -474,7 +475,7 @@ async function continueSourceThread(threadId, prompt) {
474
475
  await continueOnReply(threadId, prompt);
475
476
  return;
476
477
  }
477
- const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-CMAVNELS.js");
478
+ const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-NXZ5NDAM.js");
478
479
  await getOrchestrator2().send(threadId, prompt);
479
480
  } catch {
480
481
  }
@@ -808,9 +809,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
808
809
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
809
810
  );
810
811
  }
811
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-NSILADOM.js");
812
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-2GMALKKE.js");
812
813
  if (isGlobalThread2(thread)) {
813
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-WEPXXLLX.js");
814
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-6Q5NDWOC.js");
814
815
  ensureGlobalCoordinatorCwd2(
815
816
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
816
817
  );
@@ -3948,7 +3949,7 @@ async function createThread(input, _onSetupLine) {
3948
3949
  return readThread(thread.id) ?? thread;
3949
3950
  }
3950
3951
  async function listLinearIssues(agent, repoPath) {
3951
- const { getAdapter: getAdapter2 } = await import("./agents-BVOJNHV6.js");
3952
+ const { getAdapter: getAdapter2 } = await import("./agents-UW2BUEDH.js");
3952
3953
  await requireAgent(agent, { requireLinear: true });
3953
3954
  const adapter = getAdapter2(agent);
3954
3955
  if (!adapter.listLinearIssues) {
@@ -4394,7 +4395,7 @@ async function adoptThread(input) {
4394
4395
  messages: input.messages ?? []
4395
4396
  });
4396
4397
  writeThread(thread);
4397
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-BOC6M7BW.js");
4398
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-4CBMCP6N.js");
4398
4399
  await ensureWorkspace2(repoPath);
4399
4400
  const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-X54WSOXM.js");
4400
4401
  await ensureWorktreeSideboardIgnored2(input.worktreePath);
@@ -6978,7 +6979,7 @@ function formatScheduledPrompt(name, prompt) {
6978
6979
  ${prompt}`;
6979
6980
  }
6980
6981
  async function defaultDeps() {
6981
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-CMAVNELS.js");
6982
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-NXZ5NDAM.js");
6982
6983
  const orch = getOrchestrator2();
6983
6984
  return {
6984
6985
  findThread: (id) => findThreadByRef(id),
@@ -7948,7 +7949,12 @@ var Orchestrator = class {
7948
7949
  const stderrTail = [];
7949
7950
  const handle = await spawnAgentTurn(
7950
7951
  fresh,
7951
- { cachedPrefix, prompt: agentPrompt, systemPrompt: turnReminders },
7952
+ {
7953
+ cachedPrefix,
7954
+ prompt: agentPrompt,
7955
+ systemPrompt: turnReminders,
7956
+ isolateCodexPlugins: fresh.isolateCodexPlugins === true
7957
+ },
7952
7958
  (event) => {
7953
7959
  this.emit({ type: "turn_output", threadId, event });
7954
7960
  noteTurnLiveEvent(threadId, event);
@@ -8022,10 +8028,19 @@ var Orchestrator = class {
8022
8028
  }
8023
8029
  let lastStderr = summarizeTurnStderr(stderrTail);
8024
8030
  let detail = lastStderr || (exitCode !== 0 ? fallbackTurnFailDetail(assistantText) : "");
8025
- if (exitCode !== 0 && !assistantText && parts.length === 0 && !this.stoppedTurns.has(threadId) && shouldRetryFailedAgentTurn(detail, {
8031
+ const liveThread = this.requireThread(threadId);
8032
+ const isolateCodexPluginRetry = liveThread.agent === "codex" && shouldRetryCodexPluginIsolate(detail, {
8033
+ alreadyIsolated: liveThread.isolateCodexPlugins === true
8034
+ });
8035
+ if (isolateCodexPluginRetry) {
8036
+ updateThread(threadId, { isolateCodexPlugins: true });
8037
+ }
8038
+ if (exitCode !== 0 && !assistantText && parts.length === 0 && !this.stoppedTurns.has(threadId) && (isolateCodexPluginRetry || shouldRetryFailedAgentTurn(detail, {
8026
8039
  hasSession: Boolean(this.requireThread(threadId).sessionId)
8027
- })) {
8028
- updateThread(threadId, { sessionId: null });
8040
+ }))) {
8041
+ if (!isolateCodexPluginRetry) {
8042
+ updateThread(threadId, { sessionId: null });
8043
+ }
8029
8044
  try {
8030
8045
  const gitDirs = await resolveGitDirsForLockRecovery(thread.worktreePath);
8031
8046
  const clearedLocks = clearStaleIndexLocks(gitDirs, 2e3);
@@ -8034,7 +8049,7 @@ var Orchestrator = class {
8034
8049
  }
8035
8050
  } catch {
8036
8051
  }
8037
- const retryNote = looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
8052
+ const retryNote = isolateCodexPluginRetry ? "Codex plugin/MCP failed \u2014 continuing without that vendor plugin (Settings \u2192 Connectors + HTTP API)" : looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
8038
8053
  pushTurnStderr(stderrTail, retryNote);
8039
8054
  this.emit({
8040
8055
  type: "turn_output",
@@ -8058,7 +8073,12 @@ var Orchestrator = class {
8058
8073
  ].filter(Boolean).join("\n\n---\n\n");
8059
8074
  const retryHandle = await spawnAgentTurn(
8060
8075
  retryThread,
8061
- { cachedPrefix: retryPrefix, prompt: agentPrompt, systemPrompt: turnReminders },
8076
+ {
8077
+ cachedPrefix: retryPrefix,
8078
+ prompt: agentPrompt,
8079
+ systemPrompt: turnReminders,
8080
+ isolateCodexPlugins: isolateCodexPluginRetry || retryThread.isolateCodexPlugins === true
8081
+ },
8062
8082
  (event) => {
8063
8083
  this.emit({ type: "turn_output", threadId, event });
8064
8084
  if (event.type === "session_id") {
@@ -9129,7 +9149,7 @@ var Orchestrator = class {
9129
9149
  this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
9130
9150
  if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
9131
9151
  try {
9132
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-BOC6M7BW.js");
9152
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-4CBMCP6N.js");
9133
9153
  await ensureWorkspace2(thread.repoPath);
9134
9154
  } catch {
9135
9155
  }
@@ -9183,7 +9203,7 @@ var Orchestrator = class {
9183
9203
  `Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
9184
9204
  );
9185
9205
  }
9186
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-G3ZLM4DC.js");
9206
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-2U7SZBO2.js");
9187
9207
  const slug = thread.worktreePath.split("/").pop();
9188
9208
  const dest = thread.worktreePath;
9189
9209
  await withRepoGitLock(thread.repoPath, async () => {
@@ -9293,7 +9313,7 @@ async function startOrchestration(opts) {
9293
9313
  sourceRef: "default",
9294
9314
  ...createOpts
9295
9315
  }).catch(async () => {
9296
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-G3ZLM4DC.js");
9316
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-2U7SZBO2.js");
9297
9317
  const repo = await resolveRepoRoot2(repoPath);
9298
9318
  const def = await resolveDefaultBranch2(repo);
9299
9319
  return orch.createThread({
@@ -9303,7 +9323,7 @@ async function startOrchestration(opts) {
9303
9323
  repoPath: repo
9304
9324
  });
9305
9325
  });
9306
- const { updateThread: upd } = await import("./thread-store-2SS5V5CN.js");
9326
+ const { updateThread: upd } = await import("./thread-store-XGYWXR2P.js");
9307
9327
  const updated = upd(thread.id, {
9308
9328
  sourceType: "orchestration",
9309
9329
  sourceRef: goal
@@ -7,7 +7,7 @@ import {
7
7
  resolveRepoRoot,
8
8
  takenSlugsFromThread,
9
9
  teamSlugFromName
10
- } from "./chunk-QUW5D62C.js";
10
+ } from "./chunk-6F2L3NTL.js";
11
11
  import {
12
12
  ATTACHMENTS_DIR,
13
13
  attachmentsGitignoreBody
@@ -17,7 +17,7 @@ import {
17
17
  listThreads,
18
18
  updateThread,
19
19
  writeThread
20
- } from "./chunk-INNLWYXW.js";
20
+ } from "./chunk-DWGEBZ3C.js";
21
21
  import {
22
22
  assertOrchestratorCapableAgent,
23
23
  formatAccountProfilePlaybookLine,