Skip to content

Per-group max_idle #39

@moodmosaic

Description

@moodmosaic

max_idle is top-level only. Agents that naturally idle more than others (evaluators polling for output, reconciliation agents) hit the limit and exit before generators produce anything.

The idle counter checks whether origin/agent-work moved during the session. For short-lived sessions this is effectively per-agent — the session finishes before any other agent has pushed:

BEFORE=$(git rev-parse origin/agent-work)
# ... agent session (poll, find nothing, exit) ...
git fetch origin
AFTER=$(git rev-parse origin/agent-work)
if [ "$BEFORE" = "$AFTER" ]; then
    IDLE_COUNT=$((IDLE_COUNT + 1))

Per-group override:

{
  "max_idle": 5,
  "agents": [
    { "count": 3, "model": "claude-opus-4-6", "prompt": "build.md" },
    { "count": 1, "model": "claude-opus-4-6", "prompt": "review.md", "max_idle": 20 }
  ]
}

launch.sh reads the per-group value and passes it as MAX_IDLE to that container, falling back to the top-level default. Zero change to harness.sh.

Motivated by @anthropics' harness design post which runs an evaluator alongside generators — the evaluator needs a longer idle tolerance than the generators it monitors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions