@yu_robotics/remote-cli 1.6.239 → 1.6.241

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 (64) hide show
  1. package/dist/client/MessageHandler.d.ts +4 -0
  2. package/dist/client/MessageHandler.d.ts.map +1 -1
  3. package/dist/client/MessageHandler.js +127 -15
  4. package/dist/client/MessageHandler.js.map +1 -1
  5. package/dist/delegation/ArtifactCloseoutContinuation.d.ts +14 -0
  6. package/dist/delegation/ArtifactCloseoutContinuation.d.ts.map +1 -0
  7. package/dist/delegation/ArtifactCloseoutContinuation.js +37 -0
  8. package/dist/delegation/ArtifactCloseoutContinuation.js.map +1 -0
  9. package/dist/delegation/DelegationManager.d.ts +0 -1
  10. package/dist/delegation/DelegationManager.d.ts.map +1 -1
  11. package/dist/delegation/DelegationManager.js +1 -1
  12. package/dist/delegation/DelegationManager.js.map +1 -1
  13. package/dist/executor/ClaudePersistentExecutor.d.ts +6 -1
  14. package/dist/executor/ClaudePersistentExecutor.d.ts.map +1 -1
  15. package/dist/executor/ClaudePersistentExecutor.js +127 -34
  16. package/dist/executor/ClaudePersistentExecutor.js.map +1 -1
  17. package/dist/executor/DshExecutor.d.ts +1 -0
  18. package/dist/executor/DshExecutor.d.ts.map +1 -1
  19. package/dist/executor/IExecutor.d.ts +3 -1
  20. package/dist/executor/IExecutor.d.ts.map +1 -1
  21. package/dist/maintenance/release-notes.json +1 -1
  22. package/dist/managed/tools.d.ts +18 -0
  23. package/dist/managed/tools.d.ts.map +1 -1
  24. package/dist/scheduling/ReviewedNativeCleanup.d.ts +44 -0
  25. package/dist/scheduling/ReviewedNativeCleanup.d.ts.map +1 -0
  26. package/dist/scheduling/ReviewedNativeCleanup.js +165 -0
  27. package/dist/scheduling/ReviewedNativeCleanup.js.map +1 -0
  28. package/dist/scheduling/ScheduleCommand.d.ts +8 -0
  29. package/dist/scheduling/ScheduleCommand.d.ts.map +1 -1
  30. package/dist/scheduling/ScheduleCommand.js +15 -0
  31. package/dist/scheduling/ScheduleCommand.js.map +1 -1
  32. package/dist/scheduling/ScheduleService.d.ts +6 -0
  33. package/dist/scheduling/ScheduleService.d.ts.map +1 -1
  34. package/dist/scheduling/ScheduleService.js +84 -8
  35. package/dist/scheduling/ScheduleService.js.map +1 -1
  36. package/dist/scheduling/ScheduleToolScope.d.ts +3 -0
  37. package/dist/scheduling/ScheduleToolScope.d.ts.map +1 -1
  38. package/dist/scheduling/ScheduleToolScope.js +10 -0
  39. package/dist/scheduling/ScheduleToolScope.js.map +1 -1
  40. package/dist/scheduling/claude/ClaudeScheduleOwnership.d.ts +9 -0
  41. package/dist/scheduling/claude/ClaudeScheduleOwnership.d.ts.map +1 -1
  42. package/dist/scheduling/claude/ClaudeScheduleOwnership.js +39 -0
  43. package/dist/scheduling/claude/ClaudeScheduleOwnership.js.map +1 -1
  44. package/dist/scheduling/claude/ClaudeSessionSchedules.d.ts +14 -1
  45. package/dist/scheduling/claude/ClaudeSessionSchedules.d.ts.map +1 -1
  46. package/dist/scheduling/claude/ClaudeSessionSchedules.js +111 -7
  47. package/dist/scheduling/claude/ClaudeSessionSchedules.js.map +1 -1
  48. package/dist/scheduling/toolContract.d.ts +9 -0
  49. package/dist/scheduling/toolContract.d.ts.map +1 -1
  50. package/dist/scheduling/toolContract.js +1 -0
  51. package/dist/scheduling/toolContract.js.map +1 -1
  52. package/dist/scheduling/types.d.ts +15 -1
  53. package/dist/scheduling/types.d.ts.map +1 -1
  54. package/dist/scheduling/types.js +5 -1
  55. package/dist/scheduling/types.js.map +1 -1
  56. package/native/prebuilds/darwin-arm64/managed_native.node +0 -0
  57. package/native/prebuilds/darwin-arm64/manifest.json +1 -1
  58. package/native/prebuilds/darwin-x64/managed_native.node +0 -0
  59. package/native/prebuilds/darwin-x64/manifest.json +1 -1
  60. package/native/prebuilds/win32-arm64/managed_native.node +0 -0
  61. package/native/prebuilds/win32-arm64/manifest.json +1 -1
  62. package/native/prebuilds/win32-x64/managed_native.node +0 -0
  63. package/native/prebuilds/win32-x64/manifest.json +1 -1
  64. package/package.json +1 -1
@@ -339,6 +339,33 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
339
339
  return {
340
340
  provider: 'claude-session-skip-unadmitted-v1', strategy: 'reconstruct', orderlyOnly: true, futureOnly: true,
341
341
  handoffPolicy: 'skip-unadmitted',
342
+ cancelRetained: async (record, context) => {
343
+ const identity = JSON.parse(record.recovery.identity);
344
+ const child = this.claudeProcess, epoch = this.stopEpoch;
345
+ const current = () => context.isCurrent() && !this.isDestroyed && !this.isStopping
346
+ && !!child && this.claudeProcess === child && this.stopEpoch === epoch && this.sessionId === identity.sessionId
347
+ && record.cwd === this.currentWorkingDirectory && record.threadId === this.threadId
348
+ && identity.cwd === this.currentWorkingDirectory && identity.threadId === this.threadId
349
+ && identity.model === this.model && identity.effort === this.effort
350
+ && !!identity.effectiveModel && identity.effectiveModel === (this.acknowledgedModel || this.reportedModel || this.model)
351
+ && this.scheduleHooksReady && this.turnLedger.supported(child.pid) && !this.modelChange
352
+ && !this.retainedAbort && !this.abortOperation && !this.hasUncertainShutdown();
353
+ if (!record.nativeId || !identity.sessionId || !current()) {
354
+ throw new Error('Native cancellation requires the matching original session, model and supported current host. Open that thread and retry the full managed schedule ID; no replacement was created.');
355
+ }
356
+ const ownership = this.scheduleHostOwnership();
357
+ const predecessorConfirmed = ownership.cancellationProof();
358
+ const timezone = await this.readNativeScheduleTimezone();
359
+ if (!current())
360
+ throw new Error('Native cancellation host changed.');
361
+ await this.schedules().cancelRetained({ id: record.id, threadId: record.threadId, backend: 'claude',
362
+ cwd: record.cwd, prompt: record.prompt, rule: record.rule, recovery: record.recovery }, record.nativeId, current, timezone);
363
+ if (!current())
364
+ throw new Error('Native cancellation host changed after deletion.');
365
+ if (!predecessorConfirmed || !ownership.cancellationProof()) {
366
+ throw new Error('Owned future definition is absent on the current host, but predecessor work remains unconfirmed in this boot. Cancellation intent is retained; do not recreate the job. Review predecessor ownership before claiming complete cleanup.');
367
+ }
368
+ },
342
369
  describe: input => JSON.stringify({ marker: (0, crypto_1.randomUUID)(), sessionId: this.sessionId,
343
370
  cwd: input.cwd, threadId: this.threadId, model: this.model, effort: this.effort,
344
371
  effectiveModel: this.acknowledgedModel || this.reportedModel || this.model }),
@@ -350,22 +377,31 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
350
377
  this.scheduleRestart = undefined;
351
378
  },
352
379
  reconcile: async (record, context, emit) => {
353
- const identity = JSON.parse(record.recovery.identity);
354
- const clean = record.recovery?.handoff === 'clean' && record.recovery.nativeDefinitionAbsent;
355
- if ((!clean && (!record.recovery?.futureOnly || record.rule.kind !== 'cron'))
356
- || record.recovery?.handoffPolicy !== 'skip-unadmitted' || !context.isCurrent()
357
- || context.signal.aborted || !identity.sessionId || identity.sessionId !== this.sessionId
358
- || identity.cwd !== this.currentWorkingDirectory || identity.threadId !== this.threadId
359
- || identity.model !== this.model || identity.effort !== this.effort) {
360
- throw new Error('Original Claude context or recovery evidence changed.');
380
+ let identity;
381
+ let clean;
382
+ // Only this synchronous preflight can certify that no native admission
383
+ // began. Failures after host startup retain the ordinary uncertainty fence.
384
+ try {
385
+ identity = JSON.parse(record.recovery.identity);
386
+ clean = record.recovery?.handoff === 'clean' && record.recovery.nativeDefinitionAbsent;
387
+ if ((!clean && (!record.recovery?.futureOnly || record.rule.kind !== 'cron'))
388
+ || record.recovery?.handoffPolicy !== 'skip-unadmitted' || !context.isCurrent()
389
+ || context.signal.aborted || !identity.sessionId || identity.sessionId !== this.sessionId
390
+ || identity.cwd !== this.currentWorkingDirectory || identity.threadId !== this.threadId
391
+ || identity.model !== this.model || identity.effort !== this.effort) {
392
+ throw new Error('Original Claude context or recovery evidence changed.');
393
+ }
394
+ if (this.scheduleRestart && !this.scheduleRestart.exit)
395
+ throw new Error('Claude predecessor exit is unconfirmed.');
396
+ this.scheduleRestart = undefined;
397
+ const ownership = this.scheduleHostOwnership();
398
+ ownership.reserve(!!clean);
399
+ if (!clean)
400
+ ownership.assertRebootRecovery();
401
+ }
402
+ catch (error) {
403
+ throw new types_1.NativeScheduleNotAdmittedError(error instanceof Error ? error.message : 'Native recovery preflight refused admission.');
361
404
  }
362
- if (this.scheduleRestart && !this.scheduleRestart.exit)
363
- throw new Error('Claude predecessor exit is unconfirmed.');
364
- this.scheduleRestart = undefined;
365
- const ownership = this.scheduleHostOwnership();
366
- ownership.reserve(!!clean);
367
- if (!clean)
368
- ownership.assertRebootRecovery();
369
405
  const restoration = {};
370
406
  this.scheduleRestoring = restoration;
371
407
  const epoch = this.stopEpoch;
@@ -396,7 +432,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
396
432
  const timezone = await this.readNativeScheduleTimezone();
397
433
  if (!current() || this.claudeProcess !== child)
398
434
  throw new Error('Claude recovery host changed.');
399
- handle = await adapter.inToolOperation(`restore-${record.id}`, current, () => adapter.create(input, emit, context.isOwnerCurrent ?? context.isCurrent, timezone, clean ? 'adopt' : 'adopt-existing', record.nativeId), false);
435
+ handle = await adapter.inToolOperation(`restore-${record.id}`, current, () => adapter.create(input, emit, context.isOwnerCurrent ?? context.isCurrent, timezone, clean ? 'adopt' : 'adopt-existing', record.nativeId, context.canAdmitOccurrence), false);
400
436
  if (!current() || this.claudeProcess !== child || !this.turnLedger.supported(child?.pid))
401
437
  throw new types_1.NativeScheduleCleanupError('Claude recovery host or protocol changed.', handle);
402
438
  const recovered = this.recoverableScheduleHandle(handle, input, restoration);
@@ -421,6 +457,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
421
457
  const executor = this;
422
458
  return { ...handle,
423
459
  get nativeId() { return handle.nativeId; },
460
+ get nativeDefinitionAbsent() { return handle.nativeDefinitionAbsent; },
424
461
  get recoveryIdentity() {
425
462
  return JSON.stringify({ ...identity, sessionId: executor.sessionId,
426
463
  model: executor.model, effort: executor.effort,
@@ -504,6 +541,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
504
541
  }
505
542
  sessionSchedules;
506
543
  scheduleHooksReady = false;
544
+ scheduleGuardRequired = false;
507
545
  currentScheduleManagement = false;
508
546
  nativeScheduleTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
509
547
  schedules() {
@@ -526,6 +564,54 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
526
564
  wake: () => { this.turnLedger.changed(); void this.processQueue(); },
527
565
  });
528
566
  }
567
+ reviewedCleanupActive = false;
568
+ cleanupHosts = new WeakMap();
569
+ async withReviewedNativeCleanup(id, current, run, inTurn = false) {
570
+ if (!this.sessionId)
571
+ throw new Error('No bound Claude session. Select the original thread/session; cleanup never searches or creates another session.');
572
+ if (!current() || this.reviewedCleanupActive || this.modelChange || this.retainedAbort || this.abortOperation
573
+ || this.hasUncertainShutdown() || this.delegationWorker || this.isDestroyed || this.isStopping
574
+ || this.sandbox.isRestricted() || this.scheduleRestart || this.scheduleRestoring || (!inTurn && this.isBusy())
575
+ || !this.delegation?.groups?.includes('scheduling'))
576
+ throw new Error('Bound native cleanup is unavailable or busy. Retry when this thread is idle.');
577
+ this.reviewedCleanupActive = true;
578
+ const sessionId = this.sessionId, cwd = this.currentWorkingDirectory;
579
+ let lease;
580
+ try {
581
+ lease = this.scheduleHostOwnership().reviewedRemovalLease();
582
+ if (!inTurn)
583
+ await this.listModels();
584
+ const child = this.claudeProcess, epoch = this.stopEpoch;
585
+ if (!child || !this.scheduleHooksReady || this.sessionId !== sessionId)
586
+ throw new Error('Bound native session changed during cleanup startup.');
587
+ if (!this.cleanupHosts.has(child))
588
+ this.cleanupHosts.set(child, (0, crypto_1.randomUUID)());
589
+ const settings = JSON.stringify([this.model, this.effort, this.delegation]);
590
+ const valid = () => {
591
+ try {
592
+ lease.verify();
593
+ return current() && !this.isDestroyed && !this.isStopping && !this.abortOperation
594
+ && !this.modelChange && this.claudeProcess === child && this.stopEpoch === epoch && this.sessionId === sessionId
595
+ && this.currentWorkingDirectory === cwd && settings === JSON.stringify([this.model, this.effort, this.delegation]);
596
+ }
597
+ catch {
598
+ return false;
599
+ }
600
+ };
601
+ this.scheduleCleanupHost = child;
602
+ const adapter = this.schedules();
603
+ return await adapter.inToolOperation(id, valid, () => run({
604
+ binding: (0, crypto_1.createHash)('sha256').update(JSON.stringify([this.cleanupHosts.get(child), sessionId, cwd, epoch, settings])).digest('hex'),
605
+ sessionId, current: valid,
606
+ inventory: () => adapter.reviewedInventory(valid), remove: target => adapter.reviewedDelete(target, valid),
607
+ }), inTurn);
608
+ }
609
+ finally {
610
+ lease?.close();
611
+ this.scheduleCleanupHost = undefined;
612
+ this.reviewedCleanupActive = false;
613
+ }
614
+ }
529
615
  async withNativeScheduleOperation(id, current, run, inTurn) {
530
616
  if (this.modelChange || this.retainedAbort || this.delegationWorker || this.isDestroyed || this.isStopping || this.sandbox.isRestricted())
531
617
  throw new Error('Native schedule owner or sandbox is unavailable.');
@@ -557,7 +643,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
557
643
  }
558
644
  }
559
645
  nativeScheduleAction(id) { return this.sessionSchedules?.action(id); }
560
- async createNativeSchedule(input, onEvent, isOwnerCurrent) {
646
+ async createNativeSchedule(input, onEvent, isOwnerCurrent, canAdmitOccurrence) {
561
647
  if (this.scheduleRestart || this.modelChange || this.delegationWorker || this.isDestroyed || this.isStopping || this.sandbox.isRestricted()
562
648
  || input.cwd !== this.currentWorkingDirectory)
563
649
  throw new Error('Native schedule context or sandbox is unavailable.');
@@ -570,7 +656,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
570
656
  throw new Error('Claude recovery protocol is unsupported.');
571
657
  if (input.recovery)
572
658
  this.scheduleHostOwnership().reserve(true);
573
- return this.recoverableScheduleHandle(await this.schedules().create(input, onEvent, isOwnerCurrent, timezone), input);
659
+ return this.recoverableScheduleHandle(await this.schedules().create(input, onEvent, isOwnerCurrent, timezone, false, undefined, canAdmitOccurrence), input);
574
660
  }
575
661
  /** Inspect only the effective TZ; never log, retain, or expose settings to a model. */
576
662
  readNativeScheduleTimezone() {
@@ -651,7 +737,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
651
737
  hasUncertainShutdown() { return this.shutdownUncertain || this.isStopping || !!this.stopOperation; }
652
738
  isBusy() { return !!this.modelChange || this.isWorkBusy(); }
653
739
  isWorkBusy() {
654
- if (this.scheduleRestoring || this.retainedAbort || this.abortOperation || this.hasUncertainShutdown() || this.scheduleCleanupHost
740
+ if (this.reviewedCleanupActive || this.scheduleRestoring || this.retainedAbort || this.abortOperation || this.hasUncertainShutdown() || this.scheduleCleanupHost
655
741
  || this.scheduleRestart && this.claudeProcess === this.scheduleRestart.child)
656
742
  return true;
657
743
  if (this.sessionSchedules?.busy)
@@ -715,13 +801,15 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
715
801
  // Note: --output-format=stream-json requires --verbose
716
802
  const restricted = this.sandbox.isRestricted();
717
803
  // Claude restores session-only cron jobs from the resumed transcript, even
718
- // when the original CronCreate used durable:false. A resumed process that
719
- // cannot install our ownership hooks must therefore disable native task
720
- // execution at launch; otherwise a remote-cli job can run unowned after a
721
- // restart or in a restricted/worker process.
804
+ // when the original CronCreate used durable:false. Scheduling hosts need
805
+ // bootstrap admission hooks; every other launch disables the native Cron
806
+ // feature itself rather than relying on a scheduler preference setting.
722
807
  const managedScheduling = !this.delegationWorker && !restricted
723
808
  && this.delegation?.groups?.includes('scheduling') === true;
724
- const disableResumedSchedules = !!this.sessionId && !managedScheduling;
809
+ this.scheduleGuardRequired = !this.delegationWorker && (!!this.sessionId || managedScheduling);
810
+ // Non-owning hosts must not start the native scheduler or expose Cron tools.
811
+ // The settings flag does not suppress transcript-restored definitions.
812
+ const disableNativeSchedules = !managedScheduling;
725
813
  const mcpServers = {};
726
814
  const args = [
727
815
  '--input-format=stream-json',
@@ -729,6 +817,12 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
729
817
  '--include-partial-messages',
730
818
  '--verbose',
731
819
  ];
820
+ // Native startup holds before loading the resumed session until our first
821
+ // initialize frame (including admission hooks) is available. Unsupported
822
+ // binaries must fail startup; never retry without this barrier. Restricted
823
+ // hosts use the Cron kill switch instead, preserving SessionStart ordering.
824
+ if (managedScheduling)
825
+ args.push('--await-initialize');
732
826
  if (restricted) {
733
827
  // Sandboxed mode: OS-enforced Bash isolation; widening requests surface
734
828
  // through the permission-prompt MCP tool as approval cards. Skipping
@@ -753,8 +847,6 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
753
847
  permissions.allow = [...(permissions.allow ?? []),
754
848
  ...(0, tools_1.managedTools)(this.delegation).map(tool => `mcp__remote-cli-delegation__${tool.name}`)];
755
849
  }
756
- if (disableResumedSchedules)
757
- settings = { ...(settings ?? {}), scheduledTasksEnabled: false };
758
850
  if (settings)
759
851
  args.push('--settings', JSON.stringify(settings));
760
852
  mcpServers['remote-cli-approval'] = {
@@ -767,8 +859,6 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
767
859
  }
768
860
  else {
769
861
  args.push('--dangerously-skip-permissions');
770
- if (disableResumedSchedules)
771
- args.push('--settings', JSON.stringify({ scheduledTasksEnabled: false }));
772
862
  }
773
863
  if (this.delegation) {
774
864
  mcpServers['remote-cli-delegation'] = (0, contract_1.delegationMcpConfig)(this.delegation);
@@ -851,6 +941,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
851
941
  env: {
852
942
  ...process.env,
853
943
  FORCE_COLOR: '0',
944
+ ...(disableNativeSchedules ? { CLAUDE_CODE_DISABLE_CRON: '1' } : {}),
854
945
  // Prevent nested session error
855
946
  CLAUDECODE: '',
856
947
  CLAUDE_CODE: '',
@@ -866,7 +957,9 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
866
957
  this.turnLedger.changed();
867
958
  });
868
959
  this.nativeScheduleTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
869
- if (this.delegation?.groups?.includes('scheduling') && !this.delegationWorker && !restricted)
960
+ // Observe restored lifecycle frames even before managed tools/catalogs exist.
961
+ // Installing the adapter does not adopt or authorize any native definition.
962
+ if (!this.delegationWorker)
870
963
  this.schedules();
871
964
  if (this.delegationWorker)
872
965
  this.workerGroups.track(child);
@@ -2156,7 +2249,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
2156
2249
  }
2157
2250
  return;
2158
2251
  }
2159
- if (this.delegation?.groups?.includes('scheduling') && !this.scheduleHooksReady && !this.delegationWorker && !this.sandbox.isRestricted()) {
2252
+ if (this.scheduleGuardRequired && !this.scheduleHooksReady && !this.delegationWorker) {
2160
2253
  // Initialize callback hooks once per native process before its first model turn.
2161
2254
  this.isStarting = true;
2162
2255
  try {
@@ -2296,7 +2389,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
2296
2389
  if (this.modelChange)
2297
2390
  return { success: false, error: 'Native model change is pending or unconfirmed. Retry /model after its reply, or use /clear (session-only schedules will be lost).' };
2298
2391
  if (((this.abortOperation || this.retainedAbort) && !(this.cleanupAdmission() && options.nativeScheduleManagement && options.nativeScheduleCurrent?.()))
2299
- || this.hasUncertainShutdown() || (this.scheduleCleanupHost && !options.nativeScheduleManagement)) {
2392
+ || this.hasUncertainShutdown() || ((this.scheduleCleanupHost || this.reviewedCleanupActive) && !options.nativeScheduleManagement)) {
2300
2393
  return { success: false, error: 'Native cleanup is still pending. Retry after cleanup.' };
2301
2394
  }
2302
2395
  try {
@@ -2775,7 +2868,7 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
2775
2868
  this.turnLedger.version = typeof rawResponse.claude_code_version === 'string' ? rawResponse.claude_code_version : undefined;
2776
2869
  this.turnLedger.pid = typeof rawResponse.pid === 'number' ? rawResponse.pid : undefined;
2777
2870
  const { models, rawEntries } = (0, ClaudeSettings_1.parseClaudeModelsCatalog)(rawResponse.models, this.reportedModel || this.acknowledgedModel || this.model);
2778
- if (scheduleHooks && this.sessionId && this.delegation?.groups?.includes('scheduling')) {
2871
+ if (scheduleHooks && this.scheduleGuardRequired) {
2779
2872
  await this.readNativeScheduleTimezone();
2780
2873
  }
2781
2874
  if (scheduleHooks) {
@@ -2969,10 +3062,10 @@ class ClaudePersistentExecutor extends events_1.EventEmitter {
2969
3062
  await this.stopProcess();
2970
3063
  // Step 2: Run compact as a one-shot process outside the full context
2971
3064
  const compactResult = await new Promise((resolve) => {
2972
- const child = (0, OwnershipRuntime_1.ownedSpawn)(this.claudeCommand, ['--resume', sessionIdBeforeCompact, '--settings', JSON.stringify({ scheduledTasksEnabled: false }), '--print', '/compact'], {
3065
+ const child = (0, OwnershipRuntime_1.ownedSpawn)(this.claudeCommand, ['--resume', sessionIdBeforeCompact, '--print', '/compact'], {
2973
3066
  cwd: this.currentWorkingDirectory,
2974
3067
  stdio: ['ignore', 'pipe', 'pipe'],
2975
- env: { ...process.env, FORCE_COLOR: '0', CLAUDECODE: '', CLAUDE_CODE: '' },
3068
+ env: { ...process.env, FORCE_COLOR: '0', CLAUDECODE: '', CLAUDE_CODE: '', CLAUDE_CODE_DISABLE_CRON: '1' },
2976
3069
  });
2977
3070
  let output = '';
2978
3071
  child.stdout?.on('data', (data) => {