agentd: Add resource limits (--max-cost, --max-iter, --timeout)

t-380·WorkTask·
·
·
Created1 month ago·Updated1 month ago

Description

Edit

Background agents can run forever with no limits. Add flags to agentd run:

--max-cost=CENTS Stop if cost exceeds this --max-iter=N Stop after N iterations --timeout=SECONDS Kill container after timeout

These should be passed to the agent inside the container and/or enforced at container level.

Timeline (4)

🔄[human]Open → InProgress1 month ago
💬[human]1 month ago

agentd run now accepts --max-cost, --max-iter, --timeout; passes cost/iter flags to agent, schedules timeout to stop container and emit custom timeout event, and status/watch treat timeout/killed as errors.

🔄[human]InProgress → Done1 month ago