tycono 0.3.10-beta.0 → 0.3.11-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.3.10-beta.0",
3
+ "version": "0.3.11-beta.0",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -548,6 +548,14 @@ class ExecutionManager {
548
548
  }
549
549
  }
550
550
  }
551
+
552
+ // OOM prevention: remove completed execution from memory after delay
553
+ // (delay allows getActiveExecution to find it briefly for multiplexer/recovery)
554
+ setTimeout(() => {
555
+ this.executions.delete(execution.id);
556
+ // Also close the ActivityStream to free subscribers + file handles
557
+ execution.stream.close();
558
+ }, 30_000).unref();
551
559
  });
552
560
  }
553
561
 
@@ -915,6 +923,15 @@ Your job: monitor progress, course-correct if needed, wait for completion, then
915
923
 
916
924
  this.executions.set(execution.id, execution);
917
925
  console.log(`[ExecMgr] Recovered execution for session ${sessionId} (status: ${execution.status})`);
926
+
927
+ // OOM prevention: auto-cleanup recovered executions (they're only needed briefly for replay)
928
+ if (execution.status === 'done' || execution.status === 'error') {
929
+ setTimeout(() => {
930
+ this.executions.delete(execution.id);
931
+ execution.stream.close();
932
+ }, 30_000).unref();
933
+ }
934
+
918
935
  return execution;
919
936
  } catch (err) {
920
937
  console.warn(`[ExecMgr] Failed to recover execution from streams:`, err);
@@ -767,6 +767,10 @@ ${state.continuous ? `## Continuous Improvement Mode (ON)
767
767
  } catch (err) {
768
768
  console.error(`[Supervisor] Failed to auto-save wave ${state.waveId}:`, err);
769
769
  }
770
+
771
+ // OOM prevention: clear accumulated directive/question history
772
+ state.pendingDirectives = [];
773
+ state.pendingQuestions = [];
770
774
  }
771
775
  }
772
776