fix(agent): disable LLM wall-clock timeout during sustained goals

This commit is contained in:
Xubin Ren
2026-05-16 05:27:40 +00:00
parent 90632469f6
commit 2144af7cd0
3 changed files with 35 additions and 1 deletions
+6
View File
@@ -35,6 +35,12 @@ def goal_state_raw(metadata: Mapping[str, Any] | None) -> Any:
return _session_goal_raw(metadata)
def sustained_goal_active(metadata: Mapping[str, Any] | None) -> bool:
"""True when this session has an active sustained objective (``long_task`` bookkeeping)."""
goal = parse_goal_state(goal_state_raw(metadata))
return isinstance(goal, dict) and goal.get("status") == "active"
def parse_goal_state(blob: Any) -> dict[str, Any] | None:
if blob is None:
return None