Skip to content

Serialize managed-prefix mixed tool responses#8

Merged
mostlydev merged 2 commits intomasterfrom
issue-165-mixed-tool-call-ordering
Apr 16, 2026
Merged

Serialize managed-prefix mixed tool responses#8
mostlydev merged 2 commits intomasterfrom
issue-165-mixed-tool-call-ordering

Conversation

@mostlydev
Copy link
Copy Markdown
Owner

Summary

Serialize same-response mixed tool batches when the model emits a managed prefix followed by a runner-native suffix.

What Changed

  • classify tool ownership by order instead of treating any mixed batch as invalid
  • execute the managed prefix, occlude the native suffix, and ask the model to continue
  • keep failing closed on native-first or interleaved mixed batches with an explicit retry message
  • add unit coverage for OpenAI and Anthropic mixed-prefix serialization
  • log a dedicated intervention marker for this path

Verification

  • go test ./internal/proxy/...

Part of mostlydev/clawdapus#165

@mostlydev mostlydev marked this pull request as ready for review April 16, 2026 18:57
@mostlydev mostlydev merged commit 270976e into master Apr 16, 2026
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.

1 participant