agents: hard timeout on agent runs (hung model blocked the runner ~1h) #95

Merged
ffaerber merged 1 commits from fix/agent-run-timeout into main 2026-07-06 16:58:20 +02:00
1 Commits
Author SHA1 Message Date
Felix FaerberandClaude Opus 4.8 0771d394bd agents: hard timeout on agent runs — a hung model must not block the runner
ci / lint (pull_request) Successful in 10s
ci / lint (push) Skipped
A stalled local-ollama generate on a trivial @intern question held the single
runner slot for ~1h, queueing every agent run instance-wide (homelab run 869).

- run-agent.sh: each opencode attempt wrapped in `timeout -k 30 $AGENT_TIMEOUT`
  (default 1200s). rc=124 is not retried — a hung backend stays hung; fail fast
  and free the runner.
- agent.yml: job-level timeout-minutes: 45 as backstop.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 17:41:49 +03:00