fix: allow renaming an agent to its current name#619
Merged
jaberjaber23 merged 2 commits intoRightNow-AI:mainfrom Mar 15, 2026
Merged
fix: allow renaming an agent to its current name#619jaberjaber23 merged 2 commits intoRightNow-AI:mainfrom
jaberjaber23 merged 2 commits intoRightNow-AI:mainfrom
Conversation
Introduces a `release-fast` profile that inherits from `release` but uses thin LTO and 8 codegen units instead of full LTO + 1, cutting link time significantly while remaining fast enough for integration testing. Documents usage in CONTRIBUTING.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AgentRegistry::update_name was calling name_index.contains_key() without excluding the agent being renamed. Renaming to the same name always returned AgentAlreadyExists instead of succeeding silently. Fix: only error when a *different* agent owns the target name. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentRegistry::update_nameincorrectly rejecting a rename when the new name is the same as the current nameProblem
update_namechecksname_index.contains_key(&new_name)before proceeding. Since an agent's current name is always in the index, renaming to the same name always hit theAgentAlreadyExistserror path — even though no conflict exists.This surfaces in the dashboard whenever a user edits an agent's name and saves without changing it (e.g. after editing another field in the same form), producing an unexpected error.
Fix
Check whether the name is owned by a different agent before erroring. If the same agent already owns the name, return
Ok(())immediately.Test plan
AgentAlreadyExists🤖 Generated with Claude Code