[bug] native direct preflight aborts the whole tool batch on one malformed context call #310

Closed
opened 2026-09-02 17:25:37 +00:00 by nsaspy · 0 comments
Owner

Problem

In native direct mode, one malformed context-tool call causes the entire model-returned tool batch to fail before any valid sibling call can execute.

Observed in Auto-Dig integration runs #308, #309, and #310. In run 33268628425, the model returned three calls in one response:

  • context_peek
  • context_search
  • context_peek

A schema rejection on context_peek.selector.index caused:

phase=native_call
kind=malformed_arguments
message=native call batch failed preflight
context_calls=0
tool_calls=0

So even independently valid calls in the same batch never run, and the direct loop terminates after the first model response.

Expected behavior

Malformed tool arguments should be represented as a tool-level failure the model can recover from. One bad call should not necessarily kill the entire direct-mode trajectory or suppress unrelated valid calls in the same batch.

Required fix

  • Validate calls independently during native preflight.
  • Preserve stable ordering and call IDs.
  • Execute valid calls when safe even if a sibling call is malformed, or return structured per-call errors back into the loop so the model can correct them.
  • Do not terminate the whole direct run solely because one recoverable tool call has malformed arguments.
  • Keep hard-fail behavior for genuinely unrecoverable protocol/runtime corruption.
  • Add regression tests with a mixed batch containing at least one valid context call and one malformed context call.
  • Verify accounting remains correct for model calls, tool calls, context ops, and iterations.

The concrete schema mismatch that currently triggers this path is tracked separately in #312.

Consumer evidence: lost-rob0t/starintel-gpt-auto-dig#2095, workflow run 33268628425, Prolog-RLM ref eb2411afdaf981a0a121f55b7ddf23dc9fcef812.

## Problem In native direct mode, one malformed context-tool call causes the entire model-returned tool batch to fail before any valid sibling call can execute. Observed in Auto-Dig integration runs #308, #309, and #310. In run `33268628425`, the model returned three calls in one response: - `context_peek` - `context_search` - `context_peek` A schema rejection on `context_peek.selector.index` caused: ```text phase=native_call kind=malformed_arguments message=native call batch failed preflight context_calls=0 tool_calls=0 ``` So even independently valid calls in the same batch never run, and the direct loop terminates after the first model response. ## Expected behavior Malformed tool arguments should be represented as a tool-level failure the model can recover from. One bad call should not necessarily kill the entire direct-mode trajectory or suppress unrelated valid calls in the same batch. ## Required fix - Validate calls independently during native preflight. - Preserve stable ordering and call IDs. - Execute valid calls when safe even if a sibling call is malformed, or return structured per-call errors back into the loop so the model can correct them. - Do not terminate the whole direct run solely because one recoverable tool call has malformed arguments. - Keep hard-fail behavior for genuinely unrecoverable protocol/runtime corruption. - Add regression tests with a mixed batch containing at least one valid context call and one malformed context call. - Verify accounting remains correct for model calls, tool calls, context ops, and iterations. ## Related The concrete schema mismatch that currently triggers this path is tracked separately in #312. Consumer evidence: lost-rob0t/starintel-gpt-auto-dig#2095, workflow run `33268628425`, Prolog-RLM ref `eb2411afdaf981a0a121f55b7ddf23dc9fcef812`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/prolog-rlm#310
No description provided.