Skip to content

fix: let --agent-space-name pick only an existing agent space - #959

Open
cchu-ld wants to merge 3 commits into
mainfrom
agent-space-name-existing-only
Open

cchu-ld wants to merge 3 commits into
mainfrom
agent-space-name-existing-only

Conversation

@cchu-ld

@cchu-ld cchu-ld commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Update the behavior of --agent-space-name to pick only an existing agent space, not create a new space with that name.

If no space in the region has the name, setup stops. The error lists the agent spaces in the region, and tells you to add --new-agent-space to provision a space with that name. This applies with and without a terminal.

These items also changed:

  • The space list in a terminal no longer offers "provision a new agent space named X". It still offers "provision a new agent space", which asks for a name.
  • The help text of --agent-space-name describes the new behavior.
  • If the account has agent spaces and no flag picks one, the error now names --new-agent-space.
  • With --new-agent-space, if a space already has the name, the error tells you to remove --new-agent-space and run setup again. To pick the space by its ID, you also replace --agent-space-name with --agent-space-id <id>.

Scripts that use --agent-space-name to create a space on the first run must also pass --new-agent-space.

To test the change, run go test ./cmd/aws_devops_agent/.

🤖 Generated with Claude Code


Note

Overview
--agent-space-name now selects only an existing agent space; it no longer implicitly creates one when no space matches. If the name is missing in the region, setup fails (interactive or not) with a message that lists spaces and says to add --new-agent-space to provision with that name.

The interactive space list drops the “provision a new agent space named …” shortcut; users still get a single “provision a new agent space” path that prompts for a name. Unattended errors when spaces exist but none are chosen now mention --new-agent-space. With --new-agent-space, if the name is already taken, planning errors tell users to drop that flag to reuse the space or switch to --agent-space-id.

Breaking change for automation: scripts that relied on --agent-space-name alone to create on first run must also pass --new-agent-space.

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

cchu-ld and others added 3 commits October 22, 2026 17:15
Before this change, setup created an agent space if no space had the name
from --agent-space-name. With --yes, a wrong name made a new agent space
without a question. Now setup stops before it changes AWS and lists the
spaces in the region. To create a space, pass --new-agent-space with the
name. The space list in a terminal no longer offers a space with that name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cchu-ld
cchu-ld requested a review from a team October 23, 2026 00:31
@cchu-ld
cchu-ld marked this pull request as ready for review October 23, 2026 00:32
@cchu-ld
cchu-ld requested a review from a team as a code owner October 23, 2026 00:32
@cchu-ld
cchu-ld requested review from wchieng and removed request for a team October 23, 2026 00:32
@cchu-ld

cchu-ld commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0470ba2. Configure here.

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.

2 participants