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: name the TUI command and provider on startup-failure sentinel log (#12877)
Adam Eivy19c3ecb42c92
diff --git a/server/lib/agentSentinel.js b/server/lib/agentSentinel.jsindex 33c6b87b5f..08e1f3619b 100644--- a/server/lib/agentSentinel.js+++ b/server/lib/agentSentinel.js@@ -107,9 +107,12 @@ const STARTUP_SENTINEL_REASONS = new Set(['paste-not-rendered', 'tui-not-ready',* consequence, not a second fault. Naming it as "finalized with no sentinel"* reads as an agent that finished the task and skipped the done-signal.*/-export function missingSentinelLogMessage({ agentId, reason, sentinelPath, mergeGateReprompted = false }) {+export function missingSentinelLogMessage({ agentId, reason, sentinelPath, mergeGateReprompted = false, command, providerId }) {if (STARTUP_SENTINEL_REASONS.has(reason)) {- return `${agentId} startup failed (${reason}) before a completion sentinel could be written`;+ // The TUI identity lets a stderr fingerprint separate one provider's+ // handshake stall from another's (#12877).+ const tui = [command && `tui=${command}`, providerId && `provider=${providerId}`].filter(Boolean).join(' ');+ return `${agentId} startup failed (${reason}${tui ? ` ${tui}` : ''}) before a completion sentinel could be written`;}if (mergeGateReprompted) {return `${agentId} finalized (${reason}) without re-writing its sentinel after the merge-gate nudge — expected ${sentinelPath}`;diff --git a/server/lib/agentSentinel.test.js b/server/lib/agentSentinel.test.jsindex c41e8faa00..f767b855c7 100644--- a/server/lib/agentSentinel.test.js+++ b/server/lib/agentSentinel.test.js@@ -13,6 +13,14 @@ describe('missingSentinelLogMessage', () => {expect(message).not.toContain('finalized');});+ it('names the TUI command and provider on a startup failure, and only there', () => {+ const base = { agentId: 'agent-1', reason: 'paste-not-rendered', sentinelPath: '/work/.agent-done-agent-1' };+ expect(missingSentinelLogMessage({ ...base, command: 'codex', providerId: 'codex-tui' }))+ .toBe('agent-1 startup failed (paste-not-rendered tui=codex provider=codex-tui) before a completion sentinel could be written');+ expect(missingSentinelLogMessage({ ...base, reason: 'idle-timeout', command: 'codex', providerId: 'codex-tui' }))+ .toBe('agent-1 finalized (idle-timeout) with no completion sentinel — expected /work/.agent-done-agent-1');+ });+it('reads a missing TUI binary as a startup failure too', () => {// `command-not-found` exits before the prompt was sent — the login-shell// path printing "command not found" — so it is the same no-prompt shape.diff --git a/server/services/agentTuiSpawning/sessionController.js b/server/services/agentTuiSpawning/sessionController.jsindex effe9848b2..91eea231ca 100644--- a/server/services/agentTuiSpawning/sessionController.js+++ b/server/services/agentTuiSpawning/sessionController.js@@ -1161,6 +1161,8 @@ export function createTuiSessionController({reason,sentinelPath: sentinel.path,mergeGateReprompted,+ command: tuiConfig.command,+ providerId: provider?.id,}), { agentId });}