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: pipeline tasks stuck — wrong taskType inference and cooldown blocking stage 2

Adam Eivyd2169ed48e4a
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 65a3f6ce71..901f13dd24 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -5,6 +5,8 @@
- Codex agent output flooding UI with full prompt/config dump from stderr — filtered to only show tool execution lines and errors
- On-demand tasks silently dropped when pipeline preconditions fail (e.g., REVIEW.md already exists) — on-demand tasks now skip precondition checks since the user explicitly requested them
- Pipeline stage 2+ tasks stuck in queue forever — follow-up tasks were missing `id` and `status: 'pending'` fields when created with `raw: true`, making them invisible to the task evaluator
+- Pipeline tasks not marked completed after agent finishes — `app-improve-*` task IDs were misidentified as user tasks (expected `sys-` prefix), causing `updateTask` to look in the wrong file
+- Pipeline stage 2 tasks blocked by app cooldown — pipeline continuations now bypass the 30-minute app review cooldown
- Self-update failing with "exit code null" at npm-install step — PM2 watch restarted the server during `git checkout` (which changes `server/` files), breaking the stdout pipe to the update script. SIGPIPE killed the script before `|| true` could handle it, leaving the update incomplete. Added `trap '' PIPE` to ignore SIGPIPE so the script runs to completion.
- Improved update error messages to show signal name (e.g., "killed by SIGPIPE") instead of opaque "exit code null"
diff --git a/server/services/cos.js b/server/services/cos.js
index 906259f9d9..72e8fd2a0d 100644
--- a/server/services/cos.js
+++ b/server/services/cos.js
@@ -1092,9 +1092,10 @@ export async function evaluateTasks() {
if (await blockIfExceedsMaxSpawns(task, 'internal')) continue;
- // Check if task's app is on cooldown
+ // Check if task's app is on cooldown (pipeline continuations bypass cooldown)
const appId = task.metadata?.app;
- if (appId) {
+ const isPipelineContinuation = task.metadata?.pipeline?.currentStage > 0;
+ if (appId && !isPipelineContinuation) {
const onCooldown = await isAppOnCooldown(appId, state.config.appReviewCooldownMs);
if (onCooldown) {
emitLog('debug', `Skipping system task ${task.id} - app ${appId} on cooldown`);
diff --git a/server/services/subAgentSpawner.js b/server/services/subAgentSpawner.js
index 47ce489c5f..01fa2be44f 100644
--- a/server/services/subAgentSpawner.js
+++ b/server/services/subAgentSpawner.js
@@ -1986,7 +1986,8 @@ async function handleAgentCompletion(agentId, exitCode, success, duration) {
// Ensure taskType is set — recovered agents may lack it, causing updateTask to search the wrong file
if (task && !task.taskType) {
- task.taskType = task.id?.startsWith('sys-') ? 'internal' : 'user';
+ const id = task.id || '';
+ task.taskType = (id.startsWith('sys-') || id.startsWith('app-improve-')) ? 'internal' : 'user';
}
// Release execution lane