Skip to content

fix(sourcehunt): deliver final synthesis before late stall - #237

Open
ropoctl wants to merge 1 commit into
fix/sourcehunt-transient-gateway-retryfrom
fix/sourcehunt-final-synthesis-stall
Open

ropoctl wants to merge 1 commit into
fix/sourcehunt-transient-gateway-retryfrom
fix/sourcehunt-final-synthesis-stall

Conversation

@ropoctl

@ropoctl ropoctl commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Problem

A hunt that reaches the late no-progress boundary can enqueue its final-synthesis instruction and then immediately terminate as stalled. The instruction never reaches the model, so an otherwise bounded investigation cannot produce its intended terminal summary.

Fix

Allow a synthesis prompt that was added on the current iteration to reach the model before applying the stall guard. Budget and maximum-step limits still take precedence, and early unproductive loops still terminate normally.

Test plan

  • uv run --extra dev pytest -q tests/test_sourcehunt*.py tests/test_deep_agent_loop.py — 1123 passed
  • uv run --extra dev ruff check clearwing/sourcehunt/hunter.py tests/test_deep_agent_loop.py
  • uv run --extra dev ruff format --check clearwing/sourcehunt/hunter.py tests/test_deep_agent_loop.py
  • git diff --check

@ropoctl
ropoctl requested a review from ehartford as a code owner September 17, 2026 01:01
@ropoctl
ropoctl force-pushed the fix/sourcehunt-final-synthesis-stall branch from 54d9167 to b4e5155 Compare September 18, 2026 20:11
@ropoctl
ropoctl changed the base branch from main to fix/sourcehunt-transient-gateway-retry September 18, 2026 20:11
@ropoctl
ropoctl added this pull request to stack #242 September 18, 2026 20:25
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