-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Serena MCP rename_symbol fails silently, requires manual fallback
Description
The rename_symbol operation in Serena MCP Server is failing to perform actual renames, despite reporting success. When attempting to rename a Java class symbol, the operation claims success but renames 0 files, requiring
immediate fallback to manual shell commands.
Steps Executed
- Use find_symbol to locate a class symbol (e.g., CameraActivity in a Java file)
- Call rename_symbol with the found symbol to rename it to a new name (e.g., MyCameraActivity)
- Observe the result
Expected Behavior
The rename_symbol operation should:
- Rename the symbol in all files where it appears
- Rename the file itself if it's a class definition
- Report the actual number of files modified
- Complete the operation without requiring fallback mechanisms
Actual Behavior
✓ rename_symbol (serena MCP Server)
{"name_path":"CameraActivity","relative_path":"app/src/main/java/com/example/biofotoapp/CameraActivity.java","new_name":"MyCameraActivity"}
Successfully renamed 'CameraActivity' to 'MyCameraActivity' in 0 file(s)
The operation reports success but indicates 0 files were modified. The system then had to fall back to:
- Manual mv shell commands (first attempt even had a path typo)
- Manual text search showing 17 remaining references to the old name
Impact
This makes the rename_symbol feature unreliable and forces users/agents to manually handle renames through multiple fallback steps, defeating the purpose of having a dedicated rename operation.
Environment
- MCP Server: Serena
- CLI: Gemini CLI
- Language: Java
- File type: .java class file
