Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix([issue-711]): gate post-startup improvement queue on cos mode (claude iter-4)

Adam Eivyf0efdb010d6c
diff --git a/server/services/cos.js b/server/services/cos.js
index a3c82578f4..7ab78401ab 100644
--- a/server/services/cos.js
+++ b/server/services/cos.js
@@ -341,7 +341,10 @@ export async function start() {
setTimeout(() => {
if (!isDaemonRunning()) return;
loadState().then(async (state) => {
- if (!state.config.idleReviewEnabled) return;
+ // Gate on the CoS auto-run domain (parity with evaluateTasks and the
+ // cos-improvement-check timer): queueing improvement tasks mutates
+ // COS-TASKS.md with autonomous internal work, so off/dry-run must not queue.
+ if (!state.config.idleReviewEnabled || getDomainMode(state.config, 'cos') !== 'execute') return;
const cosTaskData = await getCosTasks();
await queueEligibleImprovementTasks(state, cosTaskData);
setImmediate(() => dequeueNextTask());