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(brain): include CLI output in scheduler error messages for diagnosability

Adam Eivy7a913ebec7bc
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 3f2258b1da..c4a2c77894 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -5,3 +5,4 @@
## Fixed
- Toggle switches rendering oversized due to min-h/min-w 44px touch-target constraints inflating the visual element
+- Brain scheduler CLI error messages now include actual CLI output for diagnosability
diff --git a/server/services/brain.js b/server/services/brain.js
index 038963d221..46a0541701 100644
--- a/server/services/brain.js
+++ b/server/services/brain.js
@@ -83,7 +83,7 @@ async function callAI(promptStageName, variables, providerOverride, modelOverrid
if (code === 0) {
resolve(output);
} else {
- reject(new Error(`CLI exited with code ${code}`));
+ reject(new Error(`CLI exited with code ${code}${output ? ': ' + output.substring(0, 500) : ''}`));
}
});