Skip to content

Relax Tool::call future bound to Send - #337

Merged
pepperoni21 merged 1 commit into
pepperoni21:masterfrom
SarthakB11:fix/issue-291
Jun 3, 2026
Merged

pepperoni21 merged 1 commit into
pepperoni21:masterfrom
SarthakB11:fix/issue-291

Conversation

@SarthakB11

Copy link
Copy Markdown
Contributor

Fixes #291.

  • Drop + Sync from the future returned by Tool::call (and ToolHolder::call); keep + Send.
  • The Tool: Send + Sync bound on the implementor is unchanged.
  • Rationale: Coordinator awaits tool calls sequentially, so Send alone is sufficient. The previous + Sync bound forced every .await inside a tool body to yield only Sync futures, ruling out common ecosystem types like bollard::Docker::start_exec, which returns Pin<Box<dyn Stream<…> + Send>> (not Sync).
  • Non-breaking: relaxing an auto-trait bound on a return type is backwards-compatible — existing Tool impls continue to compile.
  • No test added — this is a bound relaxation with no runtime behavior change, and the repo has no trybuild scaffolding for compile-only checks.

@pepperoni21
pepperoni21 merged commit 97b16e8 into pepperoni21:master Jun 3, 2026
2 of 3 checks passed
@pepperoni21

Copy link
Copy Markdown
Owner

Sorry for the delay, really appreciate your contribution :)

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.

Tool::call future requires Sync

2 participants