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

t-380·WorkTask·
·
·
Created3 months ago·Updated3 months ago·pipeline runs →

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 → InProgress3 months ago
💬[human]3 months 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 → Done3 months ago