Skip to content

docs(agents): the duplicate-id gotcha names when ids clash - #4976

Merged
cagataycali merged 1 commit into
strands-labs:mainfrom
smiglan:docs/agents-duplicate-id-gotcha
Nov 19, 2026
Merged

cagataycali merged 1 commit into
strands-labs:mainfrom
smiglan:docs/agents-duplicate-id-gotcha

Conversation

@smiglan

@smiglan smiglan commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

The AGENTS.md gotcha said two robots with the same id clash as tool names. In one world they don't:
Simulation.unique_id gives the second robot so101_2, and an Agent sees robot_so101 and robot_so101_2.
The clash is between robots in different worlds, where both keep so101 and the second tool is refused with
Tool name 'robot_so101' already exists. The line now says that.

Checked: two Robot("so101") in one world, and one in each of two Simulation()s, passed to one Agent.
Documentation only, so no changelog fragment.

One world already suffixes a second robot with a taken id (Simulation.unique_id gives so101_2), so the gotcha read as if every pair of same-named robots clashed. The clash is between robots in different worlds, whose tools share a name in one Agent.

@yinsong1986 yinsong1986 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Rewrites one bullet in AGENTS.md > Known gotchas so it matches what the code does: a second robot with a taken id in the same world is suffixed by Simulation.unique_id (so101 -> so101_2, simulation/_sceneops.py), while robots in different worlds each keep the bare id and so collide as robot_so101 when both tools are handed to one Agent. The claims check out: unique_id is per-Simulation (_robots is instance state), the tool prefix is robot, and _DeviceTool.supports_hot_reload is False, so strands' ToolRegistry.register_tool raises ValueError("Tool name 'robot_so101' already exists. ...") — the quoted message prefix is exact. Docs-only change to a non-user-facing file; no behaviour change, so no changelog.d fragment is needed and the fragment gate does not require one.

What's good

  • Corrects a gotcha that was actively misleading (the old line implied every same-id pair clashed, which unique_id prevents in-world).
  • Cites the mechanism (Simulation.unique_id) and the exact refusal text, in the same style as the surrounding bullets.
  • One change, conventional title, within the 120-column convention.

@cagataycali
cagataycali enabled auto-merge (squash) November 19, 2026 15:08
@cagataycali
cagataycali merged commit 9c50550 into strands-labs:main Nov 19, 2026
3 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.

3 participants