Context
PR #2191 wholesale-restored multiple files from pre-v2026.3.1. This captures the remaining medium-priority improvements that don't warrant individual issues.
Audit report: hq/engineering/notes/post-remediation-audit-b3b4.md
Findings
doctor.ts (2 lost checks)
noteStartupOptimizationHints() — v2026.3.1 added startup optimization hints check. Module (doctor-performance.js) exists and already exports it. Just needs import + call.
noteOpenAIOAuthTlsPrerequisites() — v2026.3.2 added OpenAI OAuth TLS prerequisites check. Module (oauth-tls-preflight.ts) exists. Needs import + call.
routes.ts (1 perf improvement)
- Conditional
loadPlugins for health --json — change loadPlugins type from boolean to boolean | ((argv: string[]) => boolean). Set routeHealth.loadPlugins = (argv) => !hasFlag(argv, "--json"). Skips local plugin metadata loading for JSON health checks.
acp/client.ts (1 platform fix)
- Wire
resolveAcpClientSpawnInvocation into startAcpServer — the function exists at HEAD but is unused. The spawn call still uses raw serverCommand/effectiveArgs instead of the resolved invocation. Needed for Windows .cmd shim handling and windowsHide.
sessions.ts (1 UI fix)
- CONTROL_UI session listing filter — prevents the gateway's control panel from appearing in session listings. Uses
GATEWAY_CLIENT_IDS constant.
config/defaults.ts (1 feature)
- Anthropic cache retention default — set
cacheRetention: "short" when primary model targets Anthropic. Useful even without model catalog.
doctor-legacy-config.ts (1 DRY refactor)
- Replace inline Slack migration message strings with
formatSlackStreamModeMigrationMessage() and formatSlackStreamingBooleanMigrationMessage() from ../config/discord-preview-streaming.js. Module exists in fork.
Exit Criterion
All 7 improvements applied where dependency modules exist. No new suppressions.
Context
PR #2191 wholesale-restored multiple files from pre-v2026.3.1. This captures the remaining medium-priority improvements that don't warrant individual issues.
Audit report:
hq/engineering/notes/post-remediation-audit-b3b4.mdFindings
doctor.ts (2 lost checks)
noteStartupOptimizationHints()— v2026.3.1 added startup optimization hints check. Module (doctor-performance.js) exists and already exports it. Just needs import + call.noteOpenAIOAuthTlsPrerequisites()— v2026.3.2 added OpenAI OAuth TLS prerequisites check. Module (oauth-tls-preflight.ts) exists. Needs import + call.routes.ts (1 perf improvement)
loadPluginsforhealth --json— changeloadPluginstype frombooleantoboolean | ((argv: string[]) => boolean). SetrouteHealth.loadPlugins = (argv) => !hasFlag(argv, "--json"). Skips local plugin metadata loading for JSON health checks.acp/client.ts (1 platform fix)
resolveAcpClientSpawnInvocationintostartAcpServer— the function exists at HEAD but is unused. The spawn call still uses rawserverCommand/effectiveArgsinstead of the resolved invocation. Needed for Windows.cmdshim handling andwindowsHide.sessions.ts (1 UI fix)
GATEWAY_CLIENT_IDSconstant.config/defaults.ts (1 feature)
cacheRetention: "short"when primary model targets Anthropic. Useful even without model catalog.doctor-legacy-config.ts (1 DRY refactor)
formatSlackStreamModeMigrationMessage()andformatSlackStreamingBooleanMigrationMessage()from../config/discord-preview-streaming.js. Module exists in fork.Exit Criterion
All 7 improvements applied where dependency modules exist. No new suppressions.