Repository navigation
fix(agent): iteration-limit summary strips display_kind/display_metadata - #1015
Conversation
handle_max_iterations hand-builds its api_messages and never popped the presentation-only keys the main loop strips (#764: must never reach a model). A DB-reloaded confab-notice row sent display_kind + display_metadata (bridge request_id, detector grammar label) on the summary request; strict Chat Completions gateways reject unknown keys. Mirror the main loop: pop both, and apply the same NousResearch#88955 neutral payload for legacy empty hidden assistant placeholders. Regression drives the real path (turn-1 confab row persisted, turn 2 reloaded from SessionDB with max_iterations=1, stream + non-stream) and asserts on captured wire bytes. Red without the fix, green with it. Kanban: t_e593f247
|
🤖 merged-by: apollo · lane: kanban-merge-pass · gate: BYPASS: FleetReview paused by Ace 2026-09-22 (state/fleetreview-pause marker present) · why: t_e593f247: Iteration-limit summary request forwards display_kind/display_metadata (confab r; Argus off card review (Ace 13:08), CI green |
|
🤖 merged-by: apollo · lane: kanban-merge-pass · gate: BYPASS: FleetReview paused by Ace 2026-09-22 (state/fleetreview-pause marker present) · why: t_e593f247: Iteration-limit summary request forwards display_kind/display_metadata (confab r; worker completed in place, CI green |
FleetReviewReview: post-merge · head Post-merge review ( profile: light (rule: default light: lines 204<800, files 2<1000000, hunks 2<1000000, no hot path) · round 0 · members: B-assert-ctx, L6, C-assert-xhigh, F · families: anthropic,openai Confidence: 4/5 No issues found. FleetReview provenance · models: B=gpt-6-sol, C=claude-code-opus-5-5, F=gpt-6-sol · cost: $0.82 · duration: 1m 30s · rounds: 1 · files examined: 2 |
Kanban t_e593f247 (found by Argus on #942 review; pre-existing on main).
handle_max_iterations builds its own api_messages and never popped display_kind / display_metadata, which the main-loop builder strips (#764 contract: they must never reach a model). A DB-reloaded confab-notice row leaked both keys, including the bridge request_id and detector grammar label, into the summary request. Strict OpenAI-compatible gateways reject unknown message keys.
Fix: pop both keys in the summary loop, and apply the same NousResearch#88955 neutral payload the main loop gives legacy empty hidden assistant placeholders.
Tests (tests/agent/test_iteration_limit_summary_display_fields.py):
All 3 red on main, green with the fix.
Overlap with #942: it adds 2 lines at the top of the same loop (is_metadata_only_tool_notice skip). Different hunk; no textual conflict expected.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.