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

feat(cos): enable resume for system agent tasks

Adam Eivy23d7cf852473
diff --git a/.changelog/v0.13.x.md b/.changelog/v0.13.x.md
index 2da4582cc7..29a4daff9e 100644
--- a/.changelog/v0.13.x.md
+++ b/.changelog/v0.13.x.md
@@ -202,6 +202,11 @@ This release expands the genome dashboard with comprehensive cancer predispositi
- **Added result verification** — if all repos return 0 security alerts, the template now instructs the agent to verify against known-alert repos before reporting "all clear"
- **Added duplicate task prevention** — template now instructs agents to check existing CoS tasks before creating new ones to avoid duplication across weekly runs
+### Agent Resume — System Task Support
+- **Resume button now available for system agent tasks** — previously the Resume button was hidden for system (CoS-internal) agents; now both user and system agents show the Resume button on completed agent cards
+- **Task type preservation** — resumed system tasks correctly create new `internal` type tasks (written to `COS-TASKS.md`) instead of defaulting to user tasks; ensures system task workflows maintain their proper task type
+- **Visual indicator** — the Resume modal shows "Resume System Agent Task" title when resuming a system agent, clarifying what type of task will be created
+
### Dashboard — Suppress "Not Found" Toast Errors for Optional Widgets
- **Fixed multiple "Not found" toast errors** appearing when navigating to the dashboard — the CosDashboardWidget and GoalProgressWidget fire API calls for supplementary data (activity calendar, learning summary, goal progress, etc.) that correctly handle missing data via `.catch(() => null)`, but the centralized `api.request()` function was showing error toasts before the error was thrown and caught
- **Added `silent` option to `api.request()`** — callers can pass `{ silent: true }` to suppress automatic toast notifications for non-critical requests, while still throwing errors for programmatic handling
diff --git a/client/src/components/cos/tabs/AgentCard.jsx b/client/src/components/cos/tabs/AgentCard.jsx
index 662562a8f9..a817ea4554 100644
--- a/client/src/components/cos/tabs/AgentCard.jsx
+++ b/client/src/components/cos/tabs/AgentCard.jsx
@@ -312,7 +312,7 @@ export default function AgentCard({ agent, onKill, onDelete, onResume, completed
<span className="hidden sm:inline">Kill</span>
</button>
)}
- {completed && !isSystemAgent && onResume && (
+ {completed && onResume && (
<button
onClick={() => onResume(agent)}
className="flex items-center gap-1 text-xs px-2 py-1 rounded bg-port-accent/20 text-port-accent hover:bg-port-accent/30 transition-colors"
diff --git a/client/src/components/cos/tabs/AgentsTab.jsx b/client/src/components/cos/tabs/AgentsTab.jsx
index ea7b49b7f9..5dcbcd5681 100644
--- a/client/src/components/cos/tabs/AgentsTab.jsx
+++ b/client/src/components/cos/tabs/AgentsTab.jsx
@@ -31,18 +31,19 @@ export default function AgentsTab({ agents, onRefresh, liveOutputs, providers, a
setResumingAgent(agent);
};
- const handleResumeSubmit = async ({ description, context, model, provider, app }) => {
+ const handleResumeSubmit = async ({ description, context, model, provider, app, type = 'user' }) => {
await api.addCosTask({
description,
context,
model: model || undefined,
provider: provider || undefined,
- app: app || undefined
+ app: app || undefined,
+ type
}).catch(err => {
toast.error(err.message);
return;
});
- toast.success('Created resume task');
+ toast.success(`Created ${type === 'internal' ? 'system ' : ''}resume task`);
setResumingAgent(null);
onRefresh();
};
@@ -170,6 +171,7 @@ export default function AgentsTab({ agents, onRefresh, liveOutputs, providers, a
{resumingAgent && (
<ResumeAgentModal
agent={resumingAgent}
+ taskType={resumingAgent.taskId?.startsWith('sys-') || resumingAgent.metadata?.taskType === 'internal' ? 'internal' : 'user'}
providers={providers}
apps={apps}
onSubmit={handleResumeSubmit}
diff --git a/client/src/components/cos/tabs/ResumeAgentModal.jsx b/client/src/components/cos/tabs/ResumeAgentModal.jsx
index ef4e387b82..b4ef313916 100644
--- a/client/src/components/cos/tabs/ResumeAgentModal.jsx
+++ b/client/src/components/cos/tabs/ResumeAgentModal.jsx
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { X, CheckCircle, AlertCircle, RotateCcw } from 'lucide-react';
-export default function ResumeAgentModal({ agent, providers, apps, onSubmit, onClose }) {
+export default function ResumeAgentModal({ agent, taskType = 'user', providers, apps, onSubmit, onClose }) {
const taskDescription = agent.metadata?.taskDescription || agent.taskId || 'Resume previous task';
const outputSummary = agent.output?.length > 0
? agent.output.slice(-20).map(o => o.line).join('\n')
@@ -39,7 +39,8 @@ export default function ResumeAgentModal({ agent, providers, apps, onSubmit, onC
context: fullContext,
model: formData.model,
provider: formData.provider,
- app: formData.app
+ app: formData.app,
+ type: taskType
});
};
@@ -47,7 +48,9 @@ export default function ResumeAgentModal({ agent, providers, apps, onSubmit, onC
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50">
<div className="bg-port-card border border-port-border rounded-xl p-6 w-full max-w-2xl max-h-[90vh] overflow-auto">
<div className="flex items-center justify-between mb-4">
- <h2 className="text-xl font-bold text-white">Resume Agent Task</h2>
+ <h2 className="text-xl font-bold text-white">
+ Resume {taskType === 'internal' ? 'System ' : ''}Agent Task
+ </h2>
<button
onClick={onClose}
className="text-gray-500 hover:text-white transition-colors"