Skip to content

fix(cli): exit non-zero when workspace rename is rejected - #679

Merged
Ziinc merged 2 commits into
mainfrom
ccr-b84e8000-3ab84a-rename-exit
Oct 3, 2026
Merged

Ziinc merged 2 commits into
mainfrom
ccr-b84e8000-3ab84a-rename-exit

Conversation

@Ziinc

@Ziinc Ziinc commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator
  • treq workspace rename reported a rejected rename (same name, invalid name, branch clash) as {"success": false} and exited 0. That result was also saved under the idempotency key, so a retry replayed it
  • A rejected rename now returns an invalid_arguments error, so it exits 1 with the standard error body and frees the key
  • Over SSH the rename dialog maps that error back to its inline message, so it shows no extra error toast
    🤖 Generated with Claude Code
    https://claude.ai/code/session_01MxqTt1WtVRKkjNXQpgkJS9
    Generated by Claude Code
    Generated by Claude Code

A rejected rename (same name, invalid name, branch clash) returned
{"success": false} with exit 0. It now fails with an invalid_arguments
error like every other command, and frees the idempotency key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MxqTt1WtVRKkjNXQpgkJS9

@Ziinc Ziinc left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review at ab7cac70: Reviewed rejected-rename error propagation and the surrounding idempotency claim cleanup. No actionable correctness or code-quality issues found in this diff; rejected results now take the standard error path instead of being cached as success.

Validation: static review of the diff, surrounding implementation and tests; PR-head CI reports success. Rust/integration tests were not rerun locally because this environment has no Cargo toolchain.

A rejected `workspace rename` now exits non-zero, so over SSH the rename
dialog received an `invalid_arguments: invalid_arguments: ...` error and
showed a "Failed to rename workspace" toast on top of the inline message.
The rename transport maps that error back to an unsuccessful result with
the code stripped, matching a local rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1poGWXMSFcPsJ8V5gujWG
@Ziinc
Ziinc merged commit cdf4f21 into main Oct 3, 2026
26 checks passed
@Ziinc
Ziinc deleted the ccr-b84e8000-3ab84a-rename-exit branch October 3, 2026 10:12

This branch was successfully deployed

1 active deployment
preview — 8718f289 Deployed Oct 3, 2026 by Ziinc via build #1652
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