Repository navigation
Conversation
…sage A source can record parallel tool calls one call per assistant message, each result in its own later user message (call A, call B, result A, result B). The writer looked for a result only in the message right after its call, so both calls were written with an empty output. It now looks through the following user messages, up to the next prompt. Fixes skillsynchq#98
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #98
What changed and why?
Converting to
opencodelost the results of parallel tool calls when the source records each call in its own assistant message and each result in its own later user message: call A, call B, result A, result B. The writer only looked at the message right after a call, so call A found call B and call B found only result A, and both were written with"output": "".Before (the regression test, on
main):After: each call keeps its result, and reading the export back pairs each call with its result again.
following_resultinsrc/harness/opencode.rslooks through the user messages after the call and stops at the next user message that holds more than tool results, which is the next prompt. Results inside the same turn are found wherever they sit; a result from a later turn is never borrowed.Test:
opencode_keeps_the_results_of_parallel_calls_written_one_per_messageintests/regression/main.rs, red onmainand green with the fix.cargo fmt --check,cargo clippy --all-targetswith-D warnings(library featuresopencode,hermes,search,codex_zstd, and--no-default-features), the wasm32 check andcargo test -p txcriptpass. The CLI crate was not built here (its default features need BoringSSL); the change is library-only.This is independent of #97 and applies to both the 2.0 export and the 2.1 document, since the 2.1 projection reads the same parts.