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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(cos): block actionable errors instead of endlessly retrying failed tasks
Adam Eivycf3720b0f510
diff --git a/.changelog/v0.10.x.md b/.changelog/v0.10.x.mdindex 4fe452674e..53949d0574 100644--- a/.changelog/v0.10.x.md+++ b/.changelog/v0.10.x.md@@ -228,7 +228,7 @@ This release introduces a structured changelog documentation system for creating### AI Provider Model Updates- **Claude Opus 4.6**: Added `claude-opus-4-6` model to Claude Code CLI provider as the new default and heavy tier model-- **GPT-5.3**: Added `gpt-5.3` model to Codex CLI provider as the new default and heavy tier model+- **GPT-5.2**: Codex CLI provider uses `gpt-5.2` as default and heavy tier model (5.3 was not yet available)### Chief of Staff - Cyberpunk 3D Avatar- **Three.js 3D Avatar**: New "Cyberpunk (3D)" avatar style using Three.js, React Three Fiber, and Drei for a fully 3D holographic head@@ -272,6 +272,11 @@ This release introduces a structured changelog documentation system for creating- **Smarter Resource Allocation**: CoS learns from past failures and allocates more capable models to struggling task types, improving overall success rates- **Transparent Logging**: Model selection logs now include learning-based reasons (e.g., "learning-suggested - task type has 45% success rate")+### CoS Actionable Error Blocking+- **Block Instead of Retry**: When a task fails with an actionable error (model-not-found, auth error, usage limit), the task is now marked as `blocked` instead of `pending` - prevents endless retry loops where the same broken config keeps failing+- **Investigation Task Created**: Actionable failures still create investigation tasks with suggested fixes, but the original task stops retrying until the root cause is resolved+- **Blocked Metadata**: Blocked tasks include the error reason, category, and timestamp for easier diagnosis+### System Task Deletion- **Task Type Detection**: Deleting system tasks (prefixed with `sys-`) now correctly passes `type=internal` to the API, fixing "Task not found" errors when deleting auto-generated investigation tasksdiff --git a/data.sample/providers.json b/data.sample/providers.jsonindex ac4abb7cb5..c0bdcc8b0b 100644--- a/data.sample/providers.json+++ b/data.sample/providers.json@@ -22,11 +22,11 @@"type": "cli","command": "codex","args": [],- "models": ["gpt-5", "gpt-5-codex", "gpt-5.3"],- "defaultModel": "gpt-5.3",+ "models": ["gpt-5", "gpt-5-codex", "gpt-5.2"],+ "defaultModel": "gpt-5.2","lightModel": "gpt-5","mediumModel": "gpt-5-codex",- "heavyModel": "gpt-5.3",+ "heavyModel": "gpt-5.2","timeout": 300000,"enabled": true,"envVars": {}diff --git a/server/services/subAgentSpawner.js b/server/services/subAgentSpawner.jsindex 0f39cc77b0..3b915b6030 100644--- a/server/services/subAgentSpawner.js+++ b/server/services/subAgentSpawner.js@@ -999,9 +999,22 @@ async function handleAgentCompletion(agentId, exitCode, success, duration) {await completeAgentRun(runId, outputBuffer, exitCode, duration, errorAnalysis);}- // Update task status- const newStatus = success ? 'completed' : 'pending';- await updateTask(task.id, { status: newStatus }, task.taskType || 'user');+ // Update task status - block actionable errors instead of retrying endlessly+ const newStatus = success ? 'completed'+ : (errorAnalysis?.actionable ? 'blocked' : 'pending');+ const statusUpdate = { status: newStatus };+ if (newStatus === 'blocked' && errorAnalysis) {+ statusUpdate.metadata = {+ ...task.metadata,+ blockedReason: errorAnalysis.message,+ blockedCategory: errorAnalysis.category,+ blockedAt: new Date().toISOString()+ };+ emitLog('warn', `🚫 Task ${task.id} blocked: ${errorAnalysis.message} (${errorAnalysis.category})`, {+ taskId: task.id, category: errorAnalysis.category+ });+ }+ await updateTask(task.id, statusUpdate, task.taskType || 'user');// On failure, handle provider status updates and create investigation task if actionableif (!success && errorAnalysis) {@@ -1175,8 +1188,22 @@ async function spawnDirectly(agentId, task, prompt, workspacePath, model, providawait completeAgentRun(agentData?.runId || runId, outputBuffer, code, duration, errorAnalysis);- const newStatus = success ? 'completed' : 'pending';- await updateTask(task.id, { status: newStatus }, task.taskType || 'user');+ // Block actionable errors instead of retrying endlessly+ const newStatus = success ? 'completed'+ : (errorAnalysis?.actionable ? 'blocked' : 'pending');+ const statusUpdate = { status: newStatus };+ if (newStatus === 'blocked' && errorAnalysis) {+ statusUpdate.metadata = {+ ...task.metadata,+ blockedReason: errorAnalysis.message,+ blockedCategory: errorAnalysis.category,+ blockedAt: new Date().toISOString()+ };+ emitLog('warn', `🚫 Task ${task.id} blocked: ${errorAnalysis.message} (${errorAnalysis.category})`, {+ taskId: task.id, category: errorAnalysis.category+ });+ }+ await updateTask(task.id, statusUpdate, task.taskType || 'user');// On failure, handle provider status updates and create investigation task if actionableif (!success && errorAnalysis) {