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(cos): remove dead evaluationIntervalMs + misleading 'Next evaluation in' countdown

Adam Eivy572ef666450d
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 40826289b6..8f31ad839b 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -20,6 +20,8 @@
- **[issue-1563] Two federated machines can now share a Chief-of-Staff backlog without ever running the same task twice.** Each task a CoS agent starts is now stamped with a time-bounded ownership *claim* — which machine took it, when, and a lease that stays alive while the agent works. Before starting any task, a machine checks the claim: if its peer holds a live lease, it backs off instead of spawning a second agent (which previously would have created conflicting worktrees and branches on the same repo and raced the recovery sweep). The lease auto-renews while the work runs and is released the moment the task finishes or fails back to the queue, and orphan recovery leaves a peer's in-flight task alone rather than resetting it. If a machine crashes mid-task its lease simply expires and the peer is free to pick the task up. The worktree each agent creates is also tagged with its origin machine. This is the safety groundwork that lets CoS be included in full peer mirroring (#1561). (`server/services/cosTaskClaim.js`, `server/services/agentLifecycle.js`, `server/services/cos.js`, `server/services/cosTaskStore.js`, `server/services/worktreeManager.js`)
+- **The misleading "Next evaluation in: any moment…" countdown is gone — CoS evaluation is event-driven, not on a timer.** The Chief-of-Staff config exposed an **Evaluation Interval** setting (baked into every autonomy preset) and a live "Next evaluation in" countdown, both computed from `lastEvaluation + evaluationIntervalMs`. But the periodic `evaluateTasks()` polling loop was removed long ago in favor of reactive, event-driven spawning (`agent:completed`, `tasks:user:added`, etc.), so `evaluationIntervalMs` no longer drove anything — which left the countdown permanently stuck at "any moment…" and the interval slider controlling nothing. The vestigial setting, the countdown (Config tab, the avatar status bubble, and the terminal panel's `# next:` line), and the now-dead `useNextEvalCountdown` hook have all been removed; the autonomy presets and config schema/defaults no longer carry `evaluationIntervalMs`. (`client/src/hooks/useNextEvalCountdown.js`, `client/src/pages/ChiefOfStaff.jsx`, `client/src/components/cos/StatusBubble.jsx`, `client/src/components/cos/TerminalCoSPanel.jsx`, `client/src/components/cos/tabs/ConfigTab.jsx`, `client/src/components/cos/constants.js`, `server/services/cosState.js`, `server/routes/cosStatusRoutes.js`)
+
## Local LLMs
- **The Hugging Face model search now lets you pick a quantization, and defaults to the highest-fidelity build that fits your machine's memory.** Previously every GGUF repo installed a single auto-chosen Q4-ish quant, hiding larger variants (like a `…-BF16.gguf`) that a big-memory box can comfortably run. Each Hugging Face result now carries a **Quant** menu listing every GGUF variant in the repo (multi-part shards summed into one entry), with a per-quant fit hint — *fits comfortably* / *tight fit* / *exceeds RAM* — measured against your usable memory. The default selection is RAM-aware: PortOS reserves headroom for the OS and KV cache, then picks the largest variant that still fits (so a 128 GB unified-memory Mac defaults to BF16/Q8 where a 16 GB laptop stays on Q4), and you can override it per model. This is purely a file-picker improvement — these are all still GGUF files the existing Ollama/LM Studio runtimes already support; nothing about the GGUF-only requirement changed (raw safetensors/full-precision HF models need a different runtime and remain out of scope). Ollama installs via `hf.co/<repo>:<quant>`; LM Studio via `<repo>@<quant>`.
diff --git a/client/src/components/cos/StatusBubble.jsx b/client/src/components/cos/StatusBubble.jsx
index d60541c1f5..ffc17b47ad 100644
--- a/client/src/components/cos/StatusBubble.jsx
+++ b/client/src/components/cos/StatusBubble.jsx
@@ -1,15 +1,10 @@
-export default function StatusBubble({ message, countdown }) {
+export default function StatusBubble({ message }) {
return (
<div className="relative mt-4 px-4 py-3 rounded-2xl max-w-[280px] text-center text-sm leading-relaxed bg-indigo-500/10 border border-indigo-500/30">
<div
className="absolute -top-2 left-1/2 -translate-x-1/2 rotate-45 w-3.5 h-3.5 bg-indigo-500/10 border-l border-t border-indigo-500/30"
/>
<div>{message}</div>
- {countdown && (
- <div className="mt-1 text-xs text-indigo-400/70 font-mono">
- Next check in {countdown.formatted}
- </div>
- )}
</div>
);
}
diff --git a/client/src/components/cos/TerminalCoSPanel.jsx b/client/src/components/cos/TerminalCoSPanel.jsx
index 23412e5ea6..cd394ca649 100644
--- a/client/src/components/cos/TerminalCoSPanel.jsx
+++ b/client/src/components/cos/TerminalCoSPanel.jsx
@@ -1,7 +1,7 @@
import { Play, Square } from 'lucide-react';
import { AGENT_STATES } from './constants';
-export default function TerminalCoSPanel({ state, speaking, statusMessage, eventLogs, running, onStart, onStop, stats, evalCountdown }) {
+export default function TerminalCoSPanel({ state, speaking, statusMessage, eventLogs, running, onStart, onStop, stats }) {
const stateConfig = AGENT_STATES[state] || AGENT_STATES.sleeping;
// Terminal-style ASCII art for the character - alien design
@@ -168,11 +168,6 @@ export default function TerminalCoSPanel({ state, speaking, statusMessage, event
<span className="text-cyan-400">$</span>
<span className="text-gray-300 truncate">{statusMessage}</span>
</div>
- {evalCountdown && (
- <div className="text-cyan-500/60 font-mono mt-0.5">
- # next: ({evalCountdown.formatted})
- </div>
- )}
</div>
{/* Stats as terminal output - desktop only */}
diff --git a/client/src/components/cos/constants.js b/client/src/components/cos/constants.js
index f15e54a32d..660711ce57 100644
--- a/client/src/components/cos/constants.js
+++ b/client/src/components/cos/constants.js
@@ -248,7 +248,6 @@ export const AUTONOMY_LEVELS = [
color: 'green',
description: 'Only processes user-defined tasks from TASKS.md',
params: {
- evaluationIntervalMs: 300000, // 5 min
maxConcurrentAgents: 1,
maxConcurrentAgentsPerProject: 1,
improvementEnabled: false,
@@ -263,7 +262,6 @@ export const AUTONOMY_LEVELS = [
color: 'blue',
description: 'Processes user tasks plus improvement tasks on schedule',
params: {
- evaluationIntervalMs: 120000, // 2 min
maxConcurrentAgents: 2,
maxConcurrentAgentsPerProject: 1,
improvementEnabled: true,
@@ -278,7 +276,6 @@ export const AUTONOMY_LEVELS = [
color: 'yellow',
description: 'Full task processing with app improvements, no proactive mode',
params: {
- evaluationIntervalMs: 60000, // 1 min
maxConcurrentAgents: 3,
maxConcurrentAgentsPerProject: 2,
improvementEnabled: true,
@@ -291,9 +288,8 @@ export const AUTONOMY_LEVELS = [
id: 'yolo',
label: 'YOLO',
color: 'red',
- description: 'Maximum autonomy with proactive task creation and frequent checks',
+ description: 'Maximum autonomy with proactive task creation',
params: {
- evaluationIntervalMs: 30000, // 30 sec
maxConcurrentAgents: 5,
maxConcurrentAgentsPerProject: 3,
improvementEnabled: true,
diff --git a/client/src/components/cos/tabs/ConfigTab.jsx b/client/src/components/cos/tabs/ConfigTab.jsx
index d716882d8d..8466088b85 100644
--- a/client/src/components/cos/tabs/ConfigTab.jsx
+++ b/client/src/components/cos/tabs/ConfigTab.jsx
@@ -3,7 +3,7 @@ import { Settings, Activity, CheckCircle, FileText } from 'lucide-react';
import toast from '../../ui/Toast';
import * as api from '../../../services/api';
import ConfigRow from './ConfigRow';
-import { AUTONOMY_LEVELS, detectAutonomyLevel, formatInterval, AVATAR_STYLE_LABELS, AUTONOMY_DOMAINS, DOMAIN_AUTONOMY_MODES, getDomainMode, DOMAIN_BUDGET_FIELDS, getDomainBudget, normalizeBudgetLimit } from '../constants';
+import { AUTONOMY_LEVELS, detectAutonomyLevel, AVATAR_STYLE_LABELS, AUTONOMY_DOMAINS, DOMAIN_AUTONOMY_MODES, getDomainMode, DOMAIN_BUDGET_FIELDS, getDomainBudget, normalizeBudgetLimit } from '../constants';
import ProviderModelSelector from '../../ProviderModelSelector';
import useProviderModels from '../../../hooks/useProviderModels';
@@ -29,7 +29,6 @@ const LEVEL_COLORS = {
// Parameter labels for display
const PARAM_LABELS = {
- evaluationIntervalMs: 'Eval',
maxConcurrentAgents: 'Agents',
maxConcurrentAgentsPerProject: 'Per Project',
improvementEnabled: 'Improve',
@@ -40,7 +39,6 @@ const PARAM_LABELS = {
// Format param value for display
const formatParamValue = (key, value) => {
- if (key === 'evaluationIntervalMs') return formatInterval(value);
if (typeof value === 'boolean') return value ? 'Yes' : 'No';
return String(value);
};
@@ -250,7 +248,7 @@ function DomainBudgetControl({ config, usage, onBudgetChange }) {
);
}
-export default function ConfigTab({ config, onUpdate, onEvaluate, avatarStyle, setAvatarStyle, evalCountdown }) {
+export default function ConfigTab({ config, onUpdate, onEvaluate, avatarStyle, setAvatarStyle }) {
const { providers, availableModels, setSelectedProviderId: setProviderHook, setSelectedModel: setModelHook, selectedProviderId: hookProviderId, selectedModel: hookModel } = useProviderModels();
const [embeddingProviderId, setEmbeddingProviderId] = useState(config?.embeddingProviderId || 'lmstudio');
const [embeddingModel, setEmbeddingModel] = useState(config?.embeddingModel || '');
@@ -269,7 +267,6 @@ export default function ConfigTab({ config, onUpdate, onEvaluate, avatarStyle, s
const [editing, setEditing] = useState(false);
const [formData, setFormData] = useState({
- evaluationIntervalMs: config?.evaluationIntervalMs || 60000,
healthCheckIntervalMs: config?.healthCheckIntervalMs || 900000,
maxConcurrentAgents: config?.maxConcurrentAgents || 3,
maxConcurrentAgentsPerProject: config?.maxConcurrentAgentsPerProject || 2,
@@ -373,22 +370,6 @@ export default function ConfigTab({ config, onUpdate, onEvaluate, avatarStyle, s
<DomainBudgetControl config={config} usage={budgetUsage} onBudgetChange={handleBudgetChange} />
<div className="bg-port-card border border-port-border rounded-lg divide-y divide-port-border">
- <ConfigRow
- label="Evaluation Interval"
- value={`${formData.evaluationIntervalMs / 1000}s`}
- editing={editing}
- type="number"
- inputValue={formData.evaluationIntervalMs / 1000}
- onChange={v => setFormData(f => ({ ...f, evaluationIntervalMs: v * 1000 }))}
- suffix="seconds"
- tooltip="How often CoS checks for pending tasks and spawns agents to work on them"
- />
- {evalCountdown && (
- <div className="flex items-center justify-between p-4 bg-port-accent/5">
- <span className="text-gray-500 text-sm">Next evaluation in</span>
- <span className="font-mono text-port-accent">{evalCountdown.formatted}</span>
- </div>
- )}
<ConfigRow
label="Health Check Interval"
value={`${formData.healthCheckIntervalMs / 60000}m`}
diff --git a/client/src/hooks/README.md b/client/src/hooks/README.md
index a2776ff281..c7620ae2c8 100644
--- a/client/src/hooks/README.md
+++ b/client/src/hooks/README.md
@@ -129,7 +129,6 @@ grep -i "what you want to do" client/src/hooks/README.md
| `useCatalogTypes` | Catalog ingredient type registry (system + user-defined) merged with the static fallback via a Provider/hook pair; synchronous fallback to the built-in six so first render never blanks. | Catalog list/picker/editor; anywhere the catalog type list/lookup is needed. |
| `useDeathClock` | 1-second countdown for death-clock display. | Mortality / death-clock surfaces. |
| `useGoalDetail` | All state + handlers backing the GoalDetailPanel (edit form, todos, milestones, plan/phases, check-ins, progress log, activity/calendar links). Loads activities + subcalendars on mount. | GoalDetailPanel composition shell; not intended for reuse outside the goals panel. |
-| `useNextEvalCountdown` | 1-second countdown to the next CoS evaluation tick. | Chief of Staff "next eval in Xs" displays. |
| `usePostSession` | Post-render callback scheduling. | Generic post-action chaining. |
| `useRecordMerge` | Duplicate Universe/Series merge flow: open → dry-run preview → resolve field conflicts → execute, with an `onMerged` refresh callback. Drives `<MergeModal>`. | Surfacing the merge-duplicates UI anywhere (Sharing → Duplicates, Universes page). Don't re-implement the preview/execute dance. |
| `useProviderModels` | AI providers + two-step provider→model selection. | Any UI that picks a provider + model. |
diff --git a/client/src/hooks/index.js b/client/src/hooks/index.js
index 749cda3e46..d39f5079db 100644
--- a/client/src/hooks/index.js
+++ b/client/src/hooks/index.js
@@ -29,7 +29,6 @@ export { default as useMediaJobProgress } from './useMediaJobProgress.js';
export * from './useMediaJobSse.js';
export { default as useMoltworldWs } from './useMoltworldWs.js';
export { default as useMounted } from './useMounted.js';
-export { default as useNextEvalCountdown } from './useNextEvalCountdown.js';
export { default as usePendingListRows } from './usePendingListRows.js';
export { default as usePopoverPosition } from './usePopoverPosition.js';
export { default as useLocalModels } from './useLocalModels.js';
diff --git a/client/src/hooks/useNextEvalCountdown.js b/client/src/hooks/useNextEvalCountdown.js
deleted file mode 100644
index 5d3829fdd3..0000000000
--- a/client/src/hooks/useNextEvalCountdown.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import { useState, useEffect } from 'react';
-
-export default function useNextEvalCountdown(lastEvaluation, intervalMs, running) {
- const [countdown, setCountdown] = useState(null);
-
- useEffect(() => {
- if (!running || !lastEvaluation || !intervalMs) {
- setCountdown(null);
- return;
- }
-
- const updateCountdown = () => {
- const lastEvalTime = new Date(lastEvaluation).getTime();
- const nextEvalTime = lastEvalTime + intervalMs;
- const now = Date.now();
- const remaining = Math.max(0, nextEvalTime - now);
-
- if (remaining <= 0) {
- setCountdown({ seconds: 0, formatted: 'any moment...' });
- } else {
- const totalSeconds = Math.ceil(remaining / 1000);
- const minutes = Math.floor(totalSeconds / 60);
- const seconds = totalSeconds % 60;
- const formatted = minutes > 0
- ? `${minutes}m ${seconds}s`
- : `${seconds}s`;
- setCountdown({ seconds: totalSeconds, formatted });
- }
- };
-
- updateCountdown();
- const timer = setInterval(updateCountdown, 1000);
- return () => clearInterval(timer);
- }, [lastEvaluation, intervalMs, running]);
-
- return countdown;
-}
diff --git a/client/src/pages/ChiefOfStaff.jsx b/client/src/pages/ChiefOfStaff.jsx
index cb918e3373..f6198e2875 100644
--- a/client/src/pages/ChiefOfStaff.jsx
+++ b/client/src/pages/ChiefOfStaff.jsx
@@ -2,7 +2,6 @@ import { useState, useEffect, useCallback, useMemo, useRef, lazy, Suspense } fro
import { useParams, useNavigate } from 'react-router-dom';
import { useSocket } from '../hooks/useSocket';
import { useLocalStorageBool } from '../hooks/useLocalStorageBool';
-import useNextEvalCountdown from '../hooks/useNextEvalCountdown';
import { useAutoRefetch } from '../hooks/useAutoRefetch';
import { useValidTab } from '../hooks/useValidTab';
import * as api from '../services/api';
@@ -104,13 +103,6 @@ export default function ChiefOfStaff() {
setDesktopPanelCollapsed((prev) => !prev);
}, [setDesktopPanelCollapsed]);
- // Countdown to next evaluation
- const evalCountdown = useNextEvalCountdown(
- status?.stats?.lastEvaluation,
- status?.config?.evaluationIntervalMs,
- status?.running
- );
-
// Derive agent state from system status
const deriveAgentState = useCallback((statusData, agentsData, healthData) => {
if (!statusData?.running) return 'sleeping';
@@ -574,7 +566,6 @@ export default function ChiefOfStaff() {
onStart={handleStart}
onStop={handleStop}
stats={status?.stats}
- evalCountdown={evalCountdown}
/>
</div>
)}
@@ -589,7 +580,6 @@ export default function ChiefOfStaff() {
onStart={handleStart}
onStop={handleStop}
stats={status?.stats}
- evalCountdown={evalCountdown}
/>
</div>
</>
@@ -727,7 +717,7 @@ export default function ChiefOfStaff() {
<StateLabel state={agentState} />
</div>
<div className={`${hasCanvasAvatar ? 'sm:-mt-4 md:-mt-6 lg:mt-0' : ''} hidden sm:block`}>
- <StatusBubble message={statusMessage} countdown={evalCountdown} />
+ <StatusBubble message={statusMessage} />
</div>
{/* Desktop Stats Grid - integrated into CoS sidebar (matches mobile compressed layout) */}
@@ -912,7 +902,7 @@ export default function ChiefOfStaff() {
)}
{activeTab === 'config' && (
<div role="tabpanel" id="tabpanel-config" aria-labelledby="tab-config">
- <ConfigTab config={status?.config} onUpdate={fetchData} onEvaluate={handleForceEvaluate} avatarStyle={configAvatarStyle} setAvatarStyle={setAvatarStyle} evalCountdown={evalCountdown} />
+ <ConfigTab config={status?.config} onUpdate={fetchData} onEvaluate={handleForceEvaluate} avatarStyle={configAvatarStyle} setAvatarStyle={setAvatarStyle} />
</div>
)}
</div>
diff --git a/server/routes/cos.test.js b/server/routes/cos.test.js
index 617d66e4c7..1984f6fe7a 100644
--- a/server/routes/cos.test.js
+++ b/server/routes/cos.test.js
@@ -200,8 +200,7 @@ describe('CoS Routes', () => {
describe('GET /api/cos/config', () => {
it('should return configuration', async () => {
const mockConfig = {
- maxConcurrentAgents: 3,
- evaluationIntervalMs: 60000
+ maxConcurrentAgents: 3
};
cos.getConfig.mockResolvedValue(mockConfig);
diff --git a/server/routes/cosStatusRoutes.js b/server/routes/cosStatusRoutes.js
index fc1a6080d2..e499f2a4eb 100644
--- a/server/routes/cosStatusRoutes.js
+++ b/server/routes/cosStatusRoutes.js
@@ -23,7 +23,6 @@ export const cosConfigSchema = z.object({
userTasksFile: z.string().optional(),
cosTasksFile: z.string().optional(),
goalsFile: z.string().optional(),
- evaluationIntervalMs: z.number().int().min(1000).optional(),
healthCheckIntervalMs: z.number().int().min(1000).optional(),
maxConcurrentAgents: z.number().int().min(1).optional(),
maxConcurrentAgentsPerProject: z.number().int().min(1).optional(),
diff --git a/server/services/cosState.js b/server/services/cosState.js
index e8a498a387..9bf5ac5ad2 100644
--- a/server/services/cosState.js
+++ b/server/services/cosState.js
@@ -33,7 +33,6 @@ export const DEFAULT_CONFIG = {
userTasksFile: 'data/TASKS.md',
cosTasksFile: 'data/COS-TASKS.md',
goalsFile: 'GOALS.md',
- evaluationIntervalMs: 60000,
healthCheckIntervalMs: 900000,
maxConcurrentAgents: 3,
maxConcurrentAgentsPerProject: 2,