← Back to context

Comment by jaapz

8 hours ago

Why would you use a constrained edit tool when you are also allowed to use the complete power of python?

Having an agent edit 100 files means the job will definitely get done correctly. When it writes a script to bulk edit things it fucks up and spends ages debugging their script.

Have you ever counted the number of times Claude fucked up quoting/escaping and had to issue a corrected tool call? Or get stuck in some tricky quoting situation for two minutes, throwing a couple piles of shit at the wall to see what sticks. IIRC I’ve even seen it eventually using the edit tool out of frustration once.

Why even offer the edit tool in that case? Also, what kind of editing could they possible do what wouldn't be possible with POSIX ed?

  • You can chain a lot more commands together with this technique than with a single Edit tool call.

    • The funny thing is that... POSIX ed is composable :-)

      You can do a gazillion edits with it in one shot.

      Of course, LLM edit tools are probably small bits of their custom code, I just find it funny. I wonder if it's a desire for certain technical characteristics that require custom code or just a lack of info on basic tools. Heck, if it's about platform availability, using an LLM to port ed to Windows (for example) should be trivial[1].

      * * *

      [1] And there are probably a million existing ports. Also, sed, ex, vi, whatever.