Skip to content

fix(agent): iteration-limit summary strips display_kind/display_metadata - #1015

Merged
Kyzcreig merged 1 commit into
mainfrom
fix/iteration-summary-strip-display-fields
Sep 25, 2026
Merged

Kyzcreig merged 1 commit into
mainfrom
fix/iteration-summary-strip-display-fields

Conversation

@Kyzcreig

@Kyzcreig Kyzcreig commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

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):

  • real path: turn 1 persists a confab row, turn 2 reloads from SessionDB with max_iterations=1, provider asks for a tool call, budget exhausts, summary fires; asserts on captured wire bytes (stream + non-stream).
  • hidden-placeholder heal on the summary path.
    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.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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
@Kyzcreig

Copy link
Copy Markdown
Collaborator Author

🤖 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

@Kyzcreig
Kyzcreig added this pull request to the merge queue Sep 24, 2026
@Kyzcreig
Kyzcreig removed this pull request from the merge queue due to a manual request Sep 24, 2026
@Kyzcreig

Copy link
Copy Markdown
Collaborator Author

🤖 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

@Kyzcreig
Kyzcreig added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 9fb3b4c Sep 25, 2026
57 checks passed
@Kyzcreig
Kyzcreig deleted the fix/iteration-summary-strip-display-fields branch September 25, 2026 02:23
@Kyzcreig Kyzcreig added the fleetreview:post-merge Ask FleetReview to review this MERGED pull (merge commit vs first parent) label Sep 25, 2026
@ang-prism

ang-prism Bot commented Sep 27, 2026

Copy link
Copy Markdown

FleetReview

Review: post-merge · head 9fb3b4c83a6c · duration 1m 34s
Profile: light (merit: default light: lines 204<800, files 2<1000000, hunks 2<1000000, no hot path) · policy: below-size-and-path-gates
Roster: B-assert-ctx → gpt-6-sol (openai), C-assert-xhigh → claude-code-opus-5-5 (anthropic), F → gpt-6-sol (openai), L6 → gpt-6-sol (openai)

Post-merge review (fleetreview:post-merge override): this reviewed the merge commit against its first parent — the bytes that already shipped. It is not a pre-merge gate pass.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleetreview:post-merge Ask FleetReview to review this MERGED pull (merge commit vs first parent)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant