Skip to content

Explain model output-limit failures without repeating research calls - #693

Merged
magnus919 merged 1 commit into
mainfrom
fix/research-output-diagnostics
Oct 17, 2026
Merged

magnus919 merged 1 commit into
mainfrom
fix/research-output-diagnostics

Conversation

@magnus919

Copy link
Copy Markdown
Contributor

When a model explicitly reported that it had reached its output limit, research status still said the call outcome was unknown. The response had arrived, but the transport discarded that distinction before the worker could save it.

Research now retains a sanitized failure receipt for finish_reason=length and reports model_output_limit. Restarting reuses that receipt without another model call. Status explains that no report was published and includes only safe status, finish reason and token counts. Timeouts, disconnects and unrecognized responses keep their existing unknown-outcome behavior.

Prompts, models, request limits, deadlines and retry behavior are unchanged. ADR-0075 and the user guide explain the failure and recovery contract.

Validation: the new regression failed before the fix; 62 focused transport, model-review and isolated-Valkey recovery tests pass. HTTP acceptance tests cover output-limit responses during planning, drafting and review, then verify status and idempotent admission after a fresh application without added calls. Full CI is required before merge.

Closes #692.

@factory-droid

factory-droid Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Droid finished @magnus919's task —— View job


Security Review

No high-confidence actionable findings were identified in the changed code.

0 inline comments posted

@magnus919

Copy link
Copy Markdown
Contributor Author

Independent review of 1f4ee3e2c0ec70010f5fe1c5bfba850ce933ed91: no blocking findings.

The review checked the narrow length-response classification, sanitized bounded metadata, receipt persistence under the existing owner fence, receipt reuse without dispatch, preservation of unknown outcomes after a lost write, and error propagation through model review. The HTTP tests exercise the first three model-call positions and verify stable status after a fresh application and idempotent admission.

This was a source review. Full CI remains required. The new test checks status and events; it does not add a separate webhook-specific assertion for this error shape.

@magnus919
magnus919 merged commit 9ee3495 into main Oct 17, 2026
25 checks passed
@magnus919
magnus919 deleted the fix/research-output-diagnostics branch October 17, 2026 05:33
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.

Explain research failures when a model response reaches its output limit

1 participant