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: scheduled tasks default to enabled for new apps, job scheduler uses UTC instead of local timezone, codex stderr noise

Adam Eivyb82ca6aa06e4
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 76f972f4ff..47e850f038 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -1,4 +1,11 @@
### Fixed
+- Scheduled tasks defaulting to enabled for existing apps when new task types are added — `isTaskTypeEnabledForApp` now defaults to disabled (opt-in) instead of enabled (opt-out)
+- Autonomous job scheduler using UTC instead of local timezone for scheduled times — daily briefing at 4:30 AM local was firing at 4:30 AM UTC. Now uses `nextLocalTime()` to compute exact UTC target from local scheduled time
+- Codex agent output flooding UI with full prompt/config dump from stderr — filtered to only show tool execution lines and errors
- 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"
+
+### Added
+
+- Toggle to enable/disable all automations for an app on the Automation tab
diff --git a/client/src/components/apps/tabs/AutomationTab.jsx b/client/src/components/apps/tabs/AutomationTab.jsx
index b3efee5419..2b602e8eaa 100644
--- a/client/src/components/apps/tabs/AutomationTab.jsx
+++ b/client/src/components/apps/tabs/AutomationTab.jsx
@@ -110,13 +110,42 @@ export default function AutomationTab({ appId, appName }) {
}
const taskTypes = schedule?.tasks ? Object.keys(schedule.tasks).sort() : [];
+ const allEnabled = taskTypes.length > 0 && taskTypes.every(t => (overrides[t] || {}).enabled === true);
+
+ const handleToggleAll = async () => {
+ const newEnabled = !allEnabled;
+ await api.toggleAllAppTaskTypes(appId, newEnabled).catch(err => {
+ toast.error(err.message);
+ return null;
+ });
+ setOverrides(prev => {
+ const updated = { ...prev };
+ for (const t of taskTypes) {
+ updated[t] = { ...updated[t], enabled: newEnabled };
+ }
+ return updated;
+ });
+ };
return (
<div className="max-w-5xl space-y-4">
<div className="flex items-center justify-between">
- <div>
- <h3 className="text-lg font-semibold text-white">Task Type Overrides</h3>
- <p className="text-sm text-gray-500">Per-app automation preferences for CoS task scheduling</p>
+ <div className="flex items-center gap-4">
+ <div>
+ <h3 className="text-lg font-semibold text-white">Task Type Overrides</h3>
+ <p className="text-sm text-gray-500">Per-app automation preferences for CoS task scheduling</p>
+ </div>
+ <button
+ onClick={handleToggleAll}
+ className={`w-10 h-5 rounded-full transition-colors relative shrink-0 ${
+ allEnabled ? 'bg-port-success' : 'bg-gray-600'
+ }`}
+ title={allEnabled ? 'Disable all automations' : 'Enable all automations'}
+ >
+ <span className={`absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform ${
+ allEnabled ? 'left-5' : 'left-0.5'
+ }`} />
+ </button>
</div>
<button
onClick={fetchData}
@@ -135,7 +164,7 @@ export default function AutomationTab({ appId, appName }) {
{taskTypes.map(taskType => {
const override = overrides[taskType] || {};
const globalConfig = schedule.tasks[taskType] || {};
- const isEnabled = override.enabled !== false;
+ const isEnabled = override.enabled === true;
const overrideInterval = override.interval || null;
const effectiveLabel = isCronExpression(overrideInterval)
? describeCron(overrideInterval) || 'cron'
diff --git a/client/src/services/api.js b/client/src/services/api.js
index 27f5157abc..64dbb84634 100644
--- a/client/src/services/api.js
+++ b/client/src/services/api.js
@@ -152,6 +152,10 @@ export const pullAndUpdateApp = (id) => request(`/apps/${id}/update`, { method:
export const buildApp = (id) => request(`/apps/${id}/build`, { method: 'POST' });
export const getAppStatus = (id) => request(`/apps/${id}/status`);
export const getAppTaskTypes = (id) => request(`/apps/${id}/task-types`);
+export const toggleAllAppTaskTypes = (id, enabled) => request(`/apps/${id}/task-types/all`, {
+ method: 'PUT',
+ body: JSON.stringify({ enabled })
+});
export const updateAppTaskTypeOverride = (id, taskType, { enabled, interval, taskMetadata } = {}) => request(`/apps/${id}/task-types/${taskType}`, {
method: 'PUT',
body: JSON.stringify({ enabled, interval, taskMetadata })
diff --git a/server/routes/apps.js b/server/routes/apps.js
index 14d587e142..5ba3279c46 100644
--- a/server/routes/apps.js
+++ b/server/routes/apps.js
@@ -322,6 +322,20 @@ router.get('/:id/task-types', loadApp, asyncHandler(async (req, res) => {
res.json({ appId: app.id, appName: app.name, taskTypeOverrides: overrides });
}));
+// PUT /api/apps/:id/task-types/all - Toggle all task types for an app
+router.put('/:id/task-types/all', loadApp, asyncHandler(async (req, res) => {
+ const { enabled } = req.body;
+ if (typeof enabled !== 'boolean') {
+ throw new ServerError('enabled must be a boolean', { status: 400, code: 'VALIDATION_ERROR' });
+ }
+ const result = await appsService.toggleAllAppTaskTypes(req.params.id, enabled);
+ if (!result) {
+ throw new ServerError('App not found', { status: 404, code: 'NOT_FOUND' });
+ }
+ console.log(`📋 ${enabled ? 'Enabled' : 'Disabled'} all task types for ${result.name}`);
+ res.json({ success: true, appId: result.id, taskTypeOverrides: result.taskTypeOverrides || {} });
+}));
+
// PUT /api/apps/:id/task-types/:taskType - Update a task type override for an app
router.put('/:id/task-types/:taskType', asyncHandler(async (req, res) => {
const { enabled, interval, taskMetadata } = req.body;
diff --git a/server/services/apps.js b/server/services/apps.js
index 0616100373..844a2213c2 100644
--- a/server/services/apps.js
+++ b/server/services/apps.js
@@ -310,8 +310,8 @@ export async function getAppTaskTypeOverrides(id) {
*/
export async function isTaskTypeEnabledForApp(id, taskType) {
const overrides = await getAppTaskTypeOverrides(id);
- // No override means inherit global (enabled); only disabled when explicitly false
- return overrides[taskType]?.enabled !== false;
+ // No override means disabled — new task types must be explicitly enabled per app
+ return overrides[taskType]?.enabled === true;
}
/**
@@ -394,6 +394,30 @@ export async function bulkUpdateAppTaskTypeOverride(taskType, { enabled } = {})
return { count: activeIds.length };
}
+/**
+ * Toggle all task types for a single app to enabled or disabled
+ */
+export async function toggleAllAppTaskTypes(id, enabled) {
+ const data = await loadApps();
+ if (!data.apps[id]) return null;
+
+ await migrateTaskTypeOverrides(id);
+
+ const overrides = data.apps[id].taskTypeOverrides || {};
+ for (const taskType of SELF_IMPROVEMENT_TASK_TYPES) {
+ const existing = overrides[taskType] || {};
+ overrides[taskType] = { ...existing, enabled };
+ }
+
+ data.apps[id].taskTypeOverrides = overrides;
+ delete data.apps[id].disabledTaskTypes;
+ data.apps[id].updatedAt = new Date().toISOString();
+ await saveApps(data);
+ appsEvents.emit('changed', { action: 'update-task-types', timestamp: Date.now() });
+
+ return { id, ...data.apps[id] };
+}
+
/**
* Get reserved ports from all registered apps
*/
diff --git a/server/services/autonomousJobs.js b/server/services/autonomousJobs.js
index 3c592d5f90..41abf004ce 100644
--- a/server/services/autonomousJobs.js
+++ b/server/services/autonomousJobs.js
@@ -649,8 +649,15 @@ async function getDueJobs() {
const timeSinceLastRun = now - lastRun
if (timeSinceLastRun >= job.intervalMs) {
- // If job has a scheduledTime, only mark due if we've passed that time today
- if (!isScheduledTimeMet(job.scheduledTime, timezone)) continue
+ // If job has a scheduledTime, compute exact UTC target in user's timezone
+ if (job.scheduledTime) {
+ const [hours, minutes] = job.scheduledTime.split(':').map(Number)
+ const targetUtc = nextLocalTime(now - DAY, hours, minutes, timezone)
+ // Not due if today's scheduled time hasn't arrived yet
+ if (now < targetUtc) continue
+ // Already ran since this scheduled occurrence
+ if (lastRun >= targetUtc) continue
+ }
// If job is weekdaysOnly, skip weekends
if (job.weekdaysOnly && !isWeekday(timezone)) continue
@@ -1061,9 +1068,7 @@ async function getNextDueJob() {
if (nextDue < earliestTime) {
earliestTime = nextDue
- const isDue = job.cronExpression
- ? Date.now() >= nextDue
- : Date.now() >= nextDue && isScheduledTimeMet(job.scheduledTime, timezone)
+ const isDue = Date.now() >= nextDue
earliest = {
jobId: job.id,
jobName: job.name,
diff --git a/server/services/subAgentSpawner.js b/server/services/subAgentSpawner.js
index 52dd13100b..1d78d19cac 100644
--- a/server/services/subAgentSpawner.js
+++ b/server/services/subAgentSpawner.js
@@ -2407,6 +2407,22 @@ async function spawnDirectly(agentId, task, prompt, workspacePath, model, provid
claudeProcess.stderr.on('data', async (data) => {
const text = data.toString();
+ // Codex dumps its entire prompt/config to stderr — filter to only useful lines
+ if (provider.id === 'codex') {
+ const lines = text.split('\n');
+ for (const line of lines) {
+ const trimmed = line.trim();
+ if (!trimmed) continue;
+ // Skip initialization noise (prompt dump, config, session info)
+ if (trimmed.startsWith('Reading prompt from stdin')) continue;
+ if (trimmed.startsWith('OpenAI Codex v')) continue;
+ // Keep exec lines (tool calls) and everything else (errors, progress)
+ outputBuffer += `[stderr] ${trimmed}\n`;
+ await appendAgentOutput(agentId, `[stderr] ${trimmed}`);
+ }
+ await writeFile(outputFile, outputBuffer).catch(() => {});
+ return;
+ }
outputBuffer += `[stderr] ${text}`;
await writeFile(outputFile, outputBuffer).catch(() => {});
await appendAgentOutput(agentId, `[stderr] ${text}`);