News for hackers. Stuff that matters.
Re:Claude Code 2.0 by willio58 on Monday September 29, 2025 @02:53PM (#45417376)
One thing I really like using them for is refactoring/reorganizing. The tedious nature of renaming, renaming all implementations, moving files around, creating/deleting folders, updating imports exports, all melts away when you task an agent with it. Of course this assumes they are good enough to do them with quality, which is like 75% of the time for me so far.
Re:Claude Code 2.0 by singularity2001 on Monday September 29, 2025 @03:04PM (#45417508)
does it use the smart refractoring hooks of the IDEs or does it do blunt text replacement
Re:Claude Code 2.0 by 0x696C6961 on Monday September 29, 2025 @04:46PM (#45418569)
The later
Re:Claude Code 2.0 by t0mas88 on Monday September 29, 2025 @04:52PM (#45418630)
Currently it's very slow because it does text replace. It would be way faster if it could use the IDE functions via an MCP.
Re:Claude Code 2.0 by Yeroc on Monday September 29, 2025 @05:26PM (#45418956)
Blunt text replacement so far. There are third-party VSCode MCP and LSM MCP servers out there that DO expose those higher-level operations. I haven't tried them out myself -- but it's on my list because I expect they'd cut down on token use and improve latency substantially. I expect Anthropic to eventually build that into their IDE integration.
Re:Claude Code 2.0 by dgunay on Monday September 29, 2025 @04:51PM (#45418612)
I've found that it can be hard or expensive for the agent to do "big but simple" refactors in some cases. For example, I recently tasked one with updating all our old APIs to accept a more strongly typed user ID instead of a generic UUID type. No business logic changes, just change the type of the parameter, and in some cases be wary of misleading argument names by lazy devs copy pasting code. This ended up burning through the entire context window of GPT-5-codex and cost the most $ of anything I've ever tasked an agent with.
Re:Claude Code 2.0 by felixyz on Tuesday September 30, 2025 @03:16AM (#45422787)
The way I do this is I task the agent with writing a script which in turn does the updates. I can inspect that script, and I can run it on a subset of files/folders, and I can git revert changes if something went wrong and ask the agent to fix the script or fine-tune it myself. And I don't burn through tokens :)

Also, another important factor (as in everything) is to do things in many small steps, instead of giving one big complicated prompt.

Re:Claude Code 2.0 by golergka on Monday September 29, 2025 @10:25PM (#45421298)
Especially when you work with a language where an unfinished refactoring with give you the type error.