@adhdev/daemon-standalone 0.9.82-rc.315 → 0.9.82-rc.316

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.
package/dist/index.js CHANGED
@@ -707,6 +707,13 @@ var require_dist = __commonJS({
707
707
  delete env2.CODEX_SANDBOX_NETWORK_DISABLED;
708
708
  delete env2.NO_COLOR;
709
709
  delete env2.COLOR;
710
+ if (process.platform === "win32") {
711
+ delete env2.CLAUDECODE;
712
+ delete env2.CLAUDE_CODE_CHILD_SESSION;
713
+ delete env2.CLAUDE_CODE_ENTRYPOINT;
714
+ delete env2.CLAUDE_CODE_SESSION_ID;
715
+ delete env2.CLAUDE_CODE_EXECPATH;
716
+ }
710
717
  applyTerminalColorEnv2(env2);
711
718
  return env2;
712
719
  }
@@ -29744,6 +29751,35 @@ var require_dist3 = __commonJS({
29744
29751
  const raw = Number(nodePolicy?.schedulingPriority);
29745
29752
  return Number.isFinite(raw) ? raw : 0;
29746
29753
  }
29754
+ function resolveTaskAffinityRole(taskMode, policy) {
29755
+ if (!taskMode) return null;
29756
+ if (policy?.enabled === false) return null;
29757
+ const override = policy?.byTaskMode && Object.prototype.hasOwnProperty.call(policy.byTaskMode, taskMode) ? policy.byTaskMode[taskMode] : void 0;
29758
+ if (typeof override === "string") {
29759
+ const trimmed = override.trim().toLowerCase();
29760
+ return trimmed ? trimmed : null;
29761
+ }
29762
+ const fallback = DEFAULT_TASKMODE_ROLE_MAP[taskMode];
29763
+ return fallback ?? null;
29764
+ }
29765
+ function resolveMeshRoleOptions(policy) {
29766
+ const out = [...STANDARD_MESH_ROLES];
29767
+ const seen = new Set(out);
29768
+ const add = (raw) => {
29769
+ if (typeof raw !== "string") return;
29770
+ const role = raw.trim().toLowerCase();
29771
+ if (!role || seen.has(role)) return;
29772
+ seen.add(role);
29773
+ out.push(role);
29774
+ };
29775
+ if (policy?.byTaskMode) {
29776
+ for (const value of Object.values(policy.byTaskMode)) add(value);
29777
+ }
29778
+ if (Array.isArray(policy?.customRoles)) {
29779
+ for (const value of policy.customRoles) add(value);
29780
+ }
29781
+ return out;
29782
+ }
29747
29783
  function resolveAutoConvergeCodeChange(policy) {
29748
29784
  return policy?.autoConvergeCodeChange === true;
29749
29785
  }
@@ -29778,6 +29814,8 @@ var require_dist3 = __commonJS({
29778
29814
  var DEFAULT_MESH_SCHEDULING_STRATEGY;
29779
29815
  var MESH_CONVERGE_REFINE_TAG;
29780
29816
  var MESH_CONVERGE_FAST_FORWARD_TAG;
29817
+ var STANDARD_MESH_ROLES;
29818
+ var DEFAULT_TASKMODE_ROLE_MAP;
29781
29819
  var DEFAULT_MESH_POLICY;
29782
29820
  var init_repo_mesh_types = __esm2({
29783
29821
  "src/repo-mesh-types.ts"() {
@@ -29791,6 +29829,14 @@ var require_dist3 = __commonJS({
29791
29829
  DEFAULT_MESH_SCHEDULING_STRATEGY = "first_eligible";
29792
29830
  MESH_CONVERGE_REFINE_TAG = "converge=refine";
29793
29831
  MESH_CONVERGE_FAST_FORWARD_TAG = "converge=fast_forward";
29832
+ STANDARD_MESH_ROLES = ["investigator", "coder", "validator", "converger"];
29833
+ DEFAULT_TASKMODE_ROLE_MAP = {
29834
+ live_debug_readonly: "investigator",
29835
+ code_change: "coder",
29836
+ launch_app: "coder",
29837
+ validation: "validator",
29838
+ convergence: "converger"
29839
+ };
29794
29840
  DEFAULT_MESH_POLICY = {
29795
29841
  requirePreTaskCheckpoint: false,
29796
29842
  requirePostTaskCheckpoint: true,
@@ -30029,10 +30075,10 @@ var require_dist3 = __commonJS({
30029
30075
  }
30030
30076
  function getDaemonBuildInfo() {
30031
30077
  if (cached2) return cached2;
30032
- const commit = readInjected(true ? "e28347641639c9d0a1e46a6141e3cfed2bc90ac2" : void 0) ?? "unknown";
30033
- const commitShort = readInjected(true ? "e2834764" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30034
- const version2 = readInjected(true ? "0.9.82-rc.315" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30035
- const builtAt = readInjected(true ? "2026-06-18T05:48:10.109Z" : void 0);
30078
+ const commit = readInjected(true ? "930909642b3f28668483159d3a8f39d0a796c61a" : void 0) ?? "unknown";
30079
+ const commitShort = readInjected(true ? "93090964" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30080
+ const version2 = readInjected(true ? "0.9.82-rc.316" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30081
+ const builtAt = readInjected(true ? "2026-06-18T07:23:33.672Z" : void 0);
30036
30082
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30037
30083
  return cached2;
30038
30084
  }
@@ -31297,8 +31343,61 @@ ${error48.message || ""}`;
31297
31343
  } else {
31298
31344
  delete policy.autoConvergeCodeChange;
31299
31345
  }
31346
+ const normalizedAffinity = normalizeTaskAffinityPolicy(policy.taskAffinity);
31347
+ if (normalizedAffinity) {
31348
+ policy.taskAffinity = normalizedAffinity;
31349
+ } else {
31350
+ delete policy.taskAffinity;
31351
+ }
31300
31352
  return policy;
31301
31353
  }
31354
+ function normalizeTaskAffinityPolicy(value) {
31355
+ if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
31356
+ const record2 = value;
31357
+ const out = {};
31358
+ let hasContent = false;
31359
+ if (typeof record2.enabled === "boolean") {
31360
+ out.enabled = record2.enabled;
31361
+ if (record2.enabled === false) hasContent = true;
31362
+ else delete out.enabled;
31363
+ }
31364
+ if (record2.byTaskMode && typeof record2.byTaskMode === "object" && !Array.isArray(record2.byTaskMode)) {
31365
+ const byTaskMode = {};
31366
+ for (const [mode, raw] of Object.entries(record2.byTaskMode)) {
31367
+ const modeKey = mode.trim();
31368
+ if (!modeKey) continue;
31369
+ if (typeof raw !== "string") continue;
31370
+ const role = raw.trim().toLowerCase();
31371
+ byTaskMode[modeKey] = role;
31372
+ if (role && !STANDARD_MESH_ROLES.includes(role)) {
31373
+ try {
31374
+ console.warn(`[mesh] task_affinity.byTaskMode.${modeKey}: custom role "${role}" is not a standard mesh role (${STANDARD_MESH_ROLES.join("/")}); routing still applies`);
31375
+ } catch {
31376
+ }
31377
+ }
31378
+ }
31379
+ if (Object.keys(byTaskMode).length > 0) {
31380
+ out.byTaskMode = byTaskMode;
31381
+ hasContent = true;
31382
+ }
31383
+ }
31384
+ if (Array.isArray(record2.customRoles)) {
31385
+ const seen = /* @__PURE__ */ new Set();
31386
+ const customRoles = [];
31387
+ for (const raw of record2.customRoles) {
31388
+ if (typeof raw !== "string") continue;
31389
+ const role = raw.trim().toLowerCase();
31390
+ if (!role || seen.has(role)) continue;
31391
+ seen.add(role);
31392
+ customRoles.push(role);
31393
+ }
31394
+ if (customRoles.length > 0) {
31395
+ out.customRoles = customRoles;
31396
+ hasContent = true;
31397
+ }
31398
+ }
31399
+ return hasContent ? out : void 0;
31400
+ }
31302
31401
  function normalizeAutoFastForwardPolicy(value) {
31303
31402
  const record2 = value && typeof value === "object" && !Array.isArray(value) ? value : {};
31304
31403
  const maxBehind = Number(record2.maxBehind);
@@ -32611,6 +32710,7 @@ Valid status values: \`completed\` | \`failed\` | \`blocked\` | \`partial\`.`;
32611
32710
  recordTaskAutoLaunch: () => recordTaskAutoLaunch,
32612
32711
  requeueTask: () => requeueTask,
32613
32712
  resolveConvergeRequiredTags: () => resolveConvergeRequiredTags,
32713
+ resolveTaskAffinityRequiredTags: () => resolveTaskAffinityRequiredTags,
32614
32714
  updateDirectDispatchStatus: () => updateDirectDispatchStatus,
32615
32715
  updateSessionTaskStatus: () => updateSessionTaskStatus,
32616
32716
  updateTaskStatus: () => updateTaskStatus,
@@ -32749,6 +32849,31 @@ Valid status values: \`completed\` | \`failed\` | \`blocked\` | \`partial\`.`;
32749
32849
  if (!optedIn) return explicitRequiredTags;
32750
32850
  return normalizeMeshCapabilityTags([...explicitRequiredTags, MESH_CONVERGE_REFINE_TAG]);
32751
32851
  }
32852
+ function meshHasNodeAdvertisingRole(nodes, role) {
32853
+ if (!Array.isArray(nodes) || nodes.length === 0) return false;
32854
+ const wanted = `role=${role}`;
32855
+ return nodes.some((node) => buildMeshNodeCapabilityTags(node).includes(wanted));
32856
+ }
32857
+ function resolveTaskAffinityRequiredTags(meshId, taskMode, explicitRequiredTags, opts) {
32858
+ if (typeof opts?.targetNodeId === "string" && opts.targetNodeId.trim()) return explicitRequiredTags;
32859
+ if (opts?.callerSpecifiedRequiredTags === true) return explicitRequiredTags;
32860
+ let mesh;
32861
+ try {
32862
+ mesh = getMesh(meshId);
32863
+ } catch {
32864
+ return explicitRequiredTags;
32865
+ }
32866
+ const role = resolveTaskAffinityRole(taskMode, mesh?.policy?.taskAffinity);
32867
+ if (!role) return explicitRequiredTags;
32868
+ if (!meshHasNodeAdvertisingRole(mesh?.nodes, role)) {
32869
+ try {
32870
+ console.warn(`[mesh] task_affinity: no node advertises role=${role} for taskMode=${taskMode} in mesh ${meshId}; skipping injection (least_loaded fallback)`);
32871
+ } catch {
32872
+ }
32873
+ return explicitRequiredTags;
32874
+ }
32875
+ return normalizeMeshCapabilityTags([...explicitRequiredTags, `role=${role}`]);
32876
+ }
32752
32877
  function withQueueLock(_meshId, fn) {
32753
32878
  return MeshRuntimeStore.getInstance().transaction(fn);
32754
32879
  }
@@ -32799,6 +32924,20 @@ Valid status values: \`completed\` | \`failed\` | \`blocked\` | \`partial\`.`;
32799
32924
  throw new Error(`duplicate_task_id: task '${id}' already exists in mesh '${meshId}'`);
32800
32925
  }
32801
32926
  assertNoDependencyCycle(meshId, id, dependsOn);
32927
+ const callerTags = normalizeMeshCapabilityTags(opts?.requiredTags);
32928
+ const callerSpecifiedRequiredTags = callerTags.length > 0;
32929
+ let resolvedRequiredTags = resolveConvergeRequiredTags(
32930
+ meshId,
32931
+ modeValidation.taskMode,
32932
+ callerTags,
32933
+ { targetNodeId: opts?.targetNodeId }
32934
+ );
32935
+ resolvedRequiredTags = resolveTaskAffinityRequiredTags(
32936
+ meshId,
32937
+ modeValidation.taskMode,
32938
+ resolvedRequiredTags,
32939
+ { targetNodeId: opts?.targetNodeId, callerSpecifiedRequiredTags }
32940
+ );
32802
32941
  const entry = {
32803
32942
  id,
32804
32943
  meshId,
@@ -32807,15 +32946,7 @@ Valid status values: \`completed\` | \`failed\` | \`blocked\` | \`partial\`.`;
32807
32946
  taskMode: modeValidation.taskMode,
32808
32947
  targetNodeId: opts?.targetNodeId,
32809
32948
  targetSessionId: opts?.targetSessionId,
32810
- // Convergence routing (opt-in): auto-inject converge=refine for code_change
32811
- // tasks so they hard-filter onto refine-capable worktree nodes. No-op unless
32812
- // the mesh opts in; explicit target_node_id / required_tags are preserved.
32813
- requiredTags: resolveConvergeRequiredTags(
32814
- meshId,
32815
- modeValidation.taskMode,
32816
- normalizeMeshCapabilityTags(opts?.requiredTags),
32817
- { targetNodeId: opts?.targetNodeId }
32818
- ),
32949
+ requiredTags: resolvedRequiredTags,
32819
32950
  ...dependsOn.length > 0 ? { dependsOn } : {},
32820
32951
  ...typeof opts?.missionId === "string" && opts.missionId.trim() ? { missionId: opts.missionId.trim() } : {},
32821
32952
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
@@ -40732,8 +40863,24 @@ Next step: ${nextStep}`;
40732
40863
  }
40733
40864
  const isWin = os12.platform() === "win32";
40734
40865
  const paths = (process.env.PATH || "").split(path17.delimiter);
40866
+ const extraDirs = [];
40867
+ if (isWin) {
40868
+ if (process.env.APPDATA) extraDirs.push(path17.join(process.env.APPDATA, "npm"));
40869
+ try {
40870
+ extraDirs.push(path17.dirname(process.execPath));
40871
+ } catch {
40872
+ }
40873
+ } else {
40874
+ extraDirs.push(path17.join(os12.homedir(), ".npm-global", "bin"));
40875
+ extraDirs.push("/usr/local/bin", "/opt/homebrew/bin");
40876
+ try {
40877
+ extraDirs.push(path17.dirname(process.execPath));
40878
+ } catch {
40879
+ }
40880
+ }
40881
+ const searchDirs = [...paths, ...extraDirs];
40735
40882
  const exes = isWin ? [".exe", ".cmd", ".bat", ""] : [""];
40736
- for (const p of paths) {
40883
+ for (const p of searchDirs) {
40737
40884
  if (!p) continue;
40738
40885
  for (const ext of exes) {
40739
40886
  const fullPath = path17.join(p, trimmed + ext);
@@ -44131,6 +44278,37 @@ ${lastSnapshot}`;
44131
44278
  if (!this.ptyProcess || typeof this.ptyProcess.getMetadata !== "function") return null;
44132
44279
  return this.ptyProcess.getMetadata();
44133
44280
  }
44281
+ /**
44282
+ * Launch metadata for the dashboard Session info panel. Re-derives the spawn plan
44283
+ * (pure — same inputs the live PTY was spawned with) so the dashboard sees the
44284
+ * resolved binary, full arg vector, and cwd without us having to persist it.
44285
+ * extraEnv values are intentionally dropped (keys only) so secrets passed at
44286
+ * launch time never reach the dashboard.
44287
+ */
44288
+ getLaunchInfo() {
44289
+ let command;
44290
+ let args = [...this.extraArgs];
44291
+ try {
44292
+ const plan = resolveCliSpawnPlan({
44293
+ provider: this.provider,
44294
+ runtimeSettings: this.runtimeSettings,
44295
+ workingDir: this.workingDir,
44296
+ extraArgs: this.extraArgs,
44297
+ extraEnv: this.extraEnv
44298
+ });
44299
+ command = plan.binaryPath;
44300
+ args = plan.allArgs;
44301
+ } catch {
44302
+ }
44303
+ return {
44304
+ command,
44305
+ args,
44306
+ extraArgs: [...this.extraArgs],
44307
+ cwd: this.workingDir,
44308
+ extraEnvKeys: Object.keys(this.extraEnv || {}),
44309
+ providerSessionId: this.providerSessionId || void 0
44310
+ };
44311
+ }
44134
44312
  updateRuntimeMeta(meta3, replace = false) {
44135
44313
  const nextProviderSessionId = typeof meta3?.providerSessionId === "string" ? meta3.providerSessionId.trim() : "";
44136
44314
  if (nextProviderSessionId) {
@@ -45478,6 +45656,7 @@ ${lastSnapshot}`;
45478
45656
  DEFAULT_STATUS_INITIAL_REPORT_DELAY_MS: () => DEFAULT_STATUS_INITIAL_REPORT_DELAY_MS,
45479
45657
  DEFAULT_STATUS_P2P_REPORT_INTERVAL_MS: () => DEFAULT_STATUS_P2P_REPORT_INTERVAL_MS,
45480
45658
  DEFAULT_STATUS_SERVER_REPORT_INTERVAL_MS: () => DEFAULT_STATUS_SERVER_REPORT_INTERVAL_MS,
45659
+ DEFAULT_TASKMODE_ROLE_MAP: () => DEFAULT_TASKMODE_ROLE_MAP,
45481
45660
  DEV_SERVER_PORT: () => DEV_SERVER_PORT,
45482
45661
  DaemonAgentStreamManager: () => DaemonAgentStreamManager,
45483
45662
  DaemonCdpInitializer: () => DaemonCdpInitializer,
@@ -45517,6 +45696,7 @@ ${lastSnapshot}`;
45517
45696
  RawTerminalAttachment: () => RawTerminalAttachment,
45518
45697
  STALE_TERMINAL_REFINE_WINDOW_MS: () => STALE_TERMINAL_REFINE_WINDOW_MS,
45519
45698
  STANDALONE_CDP_SCAN_INTERVAL_MS: () => STANDALONE_CDP_SCAN_INTERVAL_MS2,
45699
+ STANDARD_MESH_ROLES: () => STANDARD_MESH_ROLES,
45520
45700
  SessionHostPtyTransportFactory: () => SessionHostPtyTransportFactory2,
45521
45701
  TerminalAdapter: () => TerminalAdapter,
45522
45702
  TurnSnapshotTracker: () => TurnSnapshotTracker,
@@ -45750,9 +45930,12 @@ ${lastSnapshot}`;
45750
45930
  resolveGitRepository: () => resolveGitRepository,
45751
45931
  resolveMeshHostStatus: () => resolveMeshHostStatus,
45752
45932
  resolveMeshRefineValidationPlan: () => resolveMeshRefineValidationPlan,
45933
+ resolveMeshRoleOptions: () => resolveMeshRoleOptions,
45753
45934
  resolveNodeSchedulingPriority: () => resolveNodeSchedulingPriority,
45754
45935
  resolveSessionHostAppName: () => resolveSessionHostAppName,
45755
45936
  resolveSessionHostAppNameResolution: () => resolveSessionHostAppNameResolution2,
45937
+ resolveTaskAffinityRequiredTags: () => resolveTaskAffinityRequiredTags,
45938
+ resolveTaskAffinityRole: () => resolveTaskAffinityRole,
45756
45939
  resolveWorktreePath: () => resolveWorktreePath,
45757
45940
  runAsyncBatch: () => runAsyncBatch2,
45758
45941
  runGit: () => runGit,
@@ -48660,8 +48843,8 @@ ${lastSnapshot}`;
48660
48843
  if ((0, import_fs12.existsSync)(bundledCli)) resolvedCli = bundledCli;
48661
48844
  }
48662
48845
  if (!resolvedCli && appPath && os30 === "win32") {
48663
- const { dirname: dirname14 } = await import("path");
48664
- const appDir = dirname14(appPath);
48846
+ const { dirname: dirname15 } = await import("path");
48847
+ const appDir = dirname15(appPath);
48665
48848
  const candidates = [
48666
48849
  `${appDir}\\\\bin\\\\${def.cli}.cmd`,
48667
48850
  `${appDir}\\\\bin\\\\${def.cli}`,
@@ -76642,6 +76825,7 @@ ${hintLines.join("\n")}` : "",
76642
76825
  if (!target && !coord) return { success: false, error: "Session not found", sessionId };
76643
76826
  const adapter = target ? this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter : void 0;
76644
76827
  const runtimeMeta = adapter && typeof adapter.getRuntimeMetadata === "function" ? adapter.getRuntimeMetadata() : void 0;
76828
+ const launchInfo = adapter && typeof adapter.getLaunchInfo === "function" ? adapter.getLaunchInfo() : void 0;
76645
76829
  const providerType = target?.providerType || coord?.cliType || "";
76646
76830
  const providerMetaForSession = providerType ? this.deps.providerLoader.resolve?.(providerType) || this.deps.providerLoader.getMeta(providerType) : void 0;
76647
76831
  return {
@@ -76653,8 +76837,11 @@ ${hintLines.join("\n")}` : "",
76653
76837
  transport: target?.transport,
76654
76838
  workspace: target?.workspace || coord?.workspace,
76655
76839
  spawnedAtMs: target?.spawnedAtMs || coord?.startedAt,
76656
- providerSessionId: target?.providerSessionId,
76657
- runtimeMetadata: runtimeMeta
76840
+ // providerSessionId now comes from the live adapter's launch info
76841
+ // (the registry target never carried it — it was always undefined).
76842
+ providerSessionId: launchInfo?.providerSessionId || target?.providerSessionId,
76843
+ runtimeMetadata: runtimeMeta,
76844
+ launch: launchInfo
76658
76845
  },
76659
76846
  coordinator: coord ? {
76660
76847
  meshId: coord.meshId,
@@ -78495,7 +78682,7 @@ ${ptyResult.output.slice(-2e3)}`);
78495
78682
  };
78496
78683
  }
78497
78684
  const { existsSync: existsSync44, readFileSync: readFileSync35, writeFileSync: writeFileSync23, copyFileSync: copyFileSync4, mkdirSync: mkdirSync21 } = await import("fs");
78498
- const { dirname: dirname14 } = await import("path");
78685
+ const { dirname: dirname15 } = await import("path");
78499
78686
  const mcpConfigPath = coordinatorSetup.configPath;
78500
78687
  const hermesManualFallback = cliType === "hermes-cli" && configFormat === "hermes_config_yaml" ? createHermesManualMeshCoordinatorSetup(meshId, workspace) : null;
78501
78688
  let hermesBaseConfig = null;
@@ -78530,7 +78717,7 @@ ${ptyResult.output.slice(-2e3)}`);
78530
78717
  };
78531
78718
  }
78532
78719
  try {
78533
- mkdirSync21(dirname14(mcpConfigPath), { recursive: true });
78720
+ mkdirSync21(dirname15(mcpConfigPath), { recursive: true });
78534
78721
  } catch (error48) {
78535
78722
  const message = `Could not prepare MCP config path for automatic setup: ${error48?.message || error48}`;
78536
78723
  LOG2.error("MeshCoordinator", message);
@@ -78540,7 +78727,7 @@ ${ptyResult.output.slice(-2e3)}`);
78540
78727
  const hadExistingMcpConfig = existsSync44(mcpConfigPath);
78541
78728
  let existingMcpConfig = hermesBaseConfig?.config || {};
78542
78729
  if (hermesBaseConfig) {
78543
- copyHermesCoordinatorCredentialFiles(hermesBaseConfig.sourceHome, dirname14(mcpConfigPath));
78730
+ copyHermesCoordinatorCredentialFiles(hermesBaseConfig.sourceHome, dirname15(mcpConfigPath));
78544
78731
  }
78545
78732
  if (hadExistingMcpConfig) {
78546
78733
  try {
@@ -78578,7 +78765,7 @@ ${ptyResult.output.slice(-2e3)}`);
78578
78765
  const cliArgs = [];
78579
78766
  const launchEnv = {};
78580
78767
  if (configFormat === "hermes_config_yaml") {
78581
- launchEnv.HERMES_HOME = dirname14(mcpConfigPath);
78768
+ launchEnv.HERMES_HOME = dirname15(mcpConfigPath);
78582
78769
  launchEnv.HERMES_IGNORE_USER_CONFIG = "";
78583
78770
  }
78584
78771
  let autoImportContextFilePath;
@@ -87866,6 +88053,13 @@ function sanitizeSpawnEnv(baseEnv, overrides) {
87866
88053
  delete env2.CODEX_SANDBOX_NETWORK_DISABLED;
87867
88054
  delete env2.NO_COLOR;
87868
88055
  delete env2.COLOR;
88056
+ if (process.platform === "win32") {
88057
+ delete env2.CLAUDECODE;
88058
+ delete env2.CLAUDE_CODE_CHILD_SESSION;
88059
+ delete env2.CLAUDE_CODE_ENTRYPOINT;
88060
+ delete env2.CLAUDE_CODE_SESSION_ID;
88061
+ delete env2.CLAUDE_CODE_EXECPATH;
88062
+ }
87869
88063
  applyTerminalColorEnv(env2);
87870
88064
  return env2;
87871
88065
  }