From 2e8b6eac8d842ee173888302ed19b2e7baadbd7d Mon Sep 17 00:00:00 2001 From: Bulloda Date: Fri, 10 Apr 2026 13:18:56 -0700 Subject: [PATCH] fix(config): add timeoutSeconds support to agents.defaults.heartbeat The heartbeat config schema was missing the timeoutSeconds field that was documented in heartbeat.md. This caused config validation to fail when users set timeoutSeconds under agents.defaults.heartbeat. Changes: - Add timeoutSeconds to HeartbeatSchema (z.number().int().positive().optional()) - Add timeoutSeconds type definition in AgentDefaultsConfig - Add JSDoc comment for the new field Fixes #64437 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/config/types.agent-defaults.ts | 2 ++ src/config/zod-schema.agent-runtime.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/config/types.agent-defaults.ts b/src/config/types.agent-defaults.ts index 24d57013667..2ec2ff014b0 100644 --- a/src/config/types.agent-defaults.ts +++ b/src/config/types.agent-defaults.ts @@ -299,6 +299,8 @@ export type AgentDefaultsConfig = { ackMaxChars?: number; /** Suppress tool error warning payloads during heartbeat runs. */ suppressToolErrorWarnings?: boolean; + /** Run timeout in seconds for heartbeat agent turns. */ + timeoutSeconds?: number; /** * If true, run heartbeat turns with lightweight bootstrap context. * Lightweight mode keeps only HEARTBEAT.md from workspace bootstrap files. diff --git a/src/config/zod-schema.agent-runtime.ts b/src/config/zod-schema.agent-runtime.ts index 99a83511a59..eeae09a4daa 100644 --- a/src/config/zod-schema.agent-runtime.ts +++ b/src/config/zod-schema.agent-runtime.ts @@ -38,6 +38,7 @@ export const HeartbeatSchema = z includeSystemPromptSection: z.boolean().optional(), ackMaxChars: z.number().int().nonnegative().optional(), suppressToolErrorWarnings: z.boolean().optional(), + timeoutSeconds: z.number().int().positive().optional(), lightContext: z.boolean().optional(), isolatedSession: z.boolean().optional(), })