Skip to content

fix: rename Agent.run shared_tools kwarg to tools#2094

Merged
mikasenghaas merged 1 commit into
mainfrom
fix/rename-run-tools-kwarg
Jul 21, 2026
Merged

fix: rename Agent.run shared_tools kwarg to tools#2094
mikasenghaas merged 1 commit into
mainfrom
fix/rename-run-tools-kwarg

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Rename the public keyword on Agent.run / _EpisodeAgent.run from shared_tools to tools. At the run boundary "shared" is implied — the caller just hands over the tool servers this run may use.
  • The internal shared tool servers infrastructure keeps its name (Env.shared_tools(), RolloutRun, validate_pairing, mcp/launch): those servers are genuinely shared/borrowed across a whole eval, and calling them tools there would collide with Task.tools (the declared toolset classes). So the rename is scoped to the .run surface, with the seam kept at RolloutRun.

Breaking

  • Agent.run(..., shared_tools=...)Agent.run(..., tools=...). No in-repo callers passed it (the only consumer routes through internal seat plumbing, which is unchanged), so this is a rename of an undocumented kwarg.

Note

This re-targets the change from #2093 (which merged into a stacked branch, not main) directly at main.

🤖 Generated with Claude Code


Note

Low Risk
Keyword-only API rename with no in-repo callers; behavior and internal shared_tools plumbing are unchanged.

Overview
Renames the public tools keyword on Agent.run and _EpisodeAgent.run (formerly shared_tools), so callers pass borrowed MCP tool servers at the run boundary without the redundant “shared” prefix.

_EpisodeAgent still defaults from env-owned shared_tools when tools is omitted; internal rollout plumbing (_run_once, RolloutRun, validate_pairing, Env.shared_tools()) keeps the shared_tools name to avoid clashing with Task.tools.

Reviewed by Cursor Bugbot for commit b0fbf04. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Rename shared_tools parameter to tools in Agent.run and _EpisodeAgent.run

Renames the shared_tools keyword argument to tools in agent.py for both Agent.run and _EpisodeAgent.run. Risk: callers passing shared_tools= as a keyword argument will receive a TypeError.

Macroscope summarized b0fbf04.

At the run boundary "shared" is implied — the caller just passes the tool
servers this run may use. Rename the public kwarg on Agent.run and
_EpisodeAgent.run to `tools`. The internal "shared tool servers" infra keeps
its name (Env.shared_tools(), RolloutRun, validate_pairing, mcp/launch): those
servers are genuinely shared/borrowed across an eval, and `tools` there would
collide with Task.tools (declared toolset classes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@macroscopeapp

macroscopeapp Bot commented Jul 21, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved

Mechanical rename of shared_tools kwarg to tools with consistent updates across parameter definitions, docstrings, and usages. No behavioral changes.

You can customize Macroscope's approvability policy. Learn more.

@mikasenghaas
mikasenghaas merged commit 1dd627d into main Jul 21, 2026
10 of 12 checks passed
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