fix(terminal): heartbeat error text matches the 0-disables schema

Since 4317ed0e71 the heartbeat schema allows 0 (disabled) and clamps
positive values to 60, but the validation error still said "min 60",
steering models away from the valid 0. Flagged on #119202.
This commit is contained in:
kshitijk4poor
2026-09-27 13:02:07 +05:30
committed by kshitij
parent 5a85aab191
commit e6f0966b01

View File

@@ -1548,7 +1548,7 @@ def _handle_terminal(args, **kw):
heartbeat = args.get("heartbeat") or 0
persist_on_release = bool(args.get("persist_on_release", False))
if not isinstance(heartbeat, int) or isinstance(heartbeat, bool) or heartbeat < 0:
return tool_error("heartbeat must be a whole number of seconds (min 60).")
return tool_error("heartbeat must be a whole number of seconds (0 disables; positive values are clamped to min 60).")
if not args.get("background", False):
if notify or watch_patterns or notify_on_complete or heartbeat:
return tool_error(