Skip to content

fix: propagate container.id across toolRunner iterations#981

Open
daletyler1737 wants to merge 2 commits intoanthropics:mainfrom
daletyler1737:fix/toolrunner-container-propagation
Open

fix: propagate container.id across toolRunner iterations#981
daletyler1737 wants to merge 2 commits intoanthropics:mainfrom
daletyler1737:fix/toolrunner-container-propagation

Conversation

@daletyler1737
Copy link
Copy Markdown

Summary

Fix two related bugs when using with :

  1. Bug 1: is not automatically forwarded from one iteration to the next
  2. Bug 2: The workaround using either fails immediately or causes infinite loop

Root Cause: When using , each response includes a that must be passed to subsequent requests. The current implementation doesn't extract and forward this .

Fix: After receiving a message response, extract the (if present) and store it in for use in subsequent message creations.

Code Change:

// Forward container.id from response to next request for code_execution_20250120
if (this.#message?.container?.id) {
  this.#state.params.container = {
    id: this.#message.container.id,
    skills: (this.#message.container as any).skills ?? undefined,
  };
}

Fixes #964

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.

Bug: toolRunner does not propagate container.id across iterations, and setMessagesParams causes duplicate tool call loops

1 participant