Skip to content

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

Merged
mikasenghaas merged 1 commit into
fix/agent-run-drop-on-tracefrom
fix/agent-run-tools-kwarg
Jul 21, 2026
Merged

fix: rename Agent.run shared_tools kwarg to tools#2093
mikasenghaas merged 1 commit into
fix/agent-run-drop-on-tracefrom
fix/agent-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 routed through the internal seat plumbing, which is unchanged), so this is a rename of an undocumented kwarg.

Note

Stacked on #2091 (base is fix/agent-run-drop-on-trace); will retarget to main once that merges.

🤖 Generated with Claude Code


Note

Low Risk
Surface-only API rename on an optional kwarg with no in-repo callers passing it; behavior and internal wiring stay the same.

Overview
Renames the public keyword on Agent.run and _EpisodeAgent.run from shared_tools to tools, so callers pass borrowed MCP tool servers at the run boundary without the redundant "shared" prefix.

Internal rollout plumbing is unchanged: _run_once, _rollout_params, RolloutRun, validate_pairing, and env _shared_tools still use shared_tools, avoiding collision with Task.tools (declared toolset classes). _EpisodeAgent still defaults runs via _shared_for when tools is omitted.

Breaking: Agent.run(..., shared_tools=...) must become Agent.run(..., tools=...).

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

Note

Rename shared_tools kwarg 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, and updates docstrings and internal call sites to match. Risk: any caller passing shared_tools= as a keyword argument will get a TypeError at runtime.

Macroscope summarized 6844eaf.

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

Pure mechanical rename of keyword argument from shared_tools to tools with corresponding docstring updates. No logic or behavioral changes.

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

@mikasenghaas
mikasenghaas merged this pull request into fix/agent-run-drop-on-trace Jul 21, 2026
5 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