Skip to content

add max_iterations hook to the drafter#192

Merged
derekmisler merged 1 commit into
docker:mainfrom
derekmisler:add-maxiterations-hook-to-the-drafter
May 7, 2026
Merged

add max_iterations hook to the drafter#192
derekmisler merged 1 commit into
docker:mainfrom
derekmisler:add-maxiterations-hook-to-the-drafter

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

@derekmisler derekmisler commented May 7, 2026

Summary

Add max_iterations hook to the drafter agent and improve timeout handling to prevent LLM calls from consuming the entire job budget. Also adds date timestamps to agent outputs for better debugging.

Changes

  • Drafter agent: Add max_iterations: 40 hook to before_llm_call to prevent runaway iterations
  • Verifier agent: Add matching max_iterations: 40 hook for consistency
  • Job timeout: Set workflow job timeout to 35 minutes to enforce a hard deadline
  • LLM call timeout: Add 180-second (3 min) timeout to haiku calls to prevent hangs from consuming the job budget
  • Agent timestamps: Add add_date: true to root, drafter, and verifier agents for better traceability

Test plan

  • Verify the PR review workflow completes within the 35-minute timeout
  • Confirm that individual LLM calls timeout after 3 minutes if they hang
  • Check that agent outputs now include timestamps for debugging

Closes: https://github.com/docker/gordon/issues/557

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler self-assigned this May 7, 2026
@derekmisler derekmisler requested a review from a team May 7, 2026 17:13
@derekmisler derekmisler marked this pull request as ready for review May 7, 2026 17:13
@derekmisler derekmisler merged commit a588b69 into docker:main May 7, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants