• dan@upvote.au
    link
    fedilink
    arrow-up
    36
    arrow-down
    3
    ·
    edit-2
    9 hours ago

    Claude is very good at figuring out how to work around limitations (which is probably one reason why it’s also good at finding security issues).

    At work, the monorepo is enormous and files are loaded on-demand as needed. This isn’t uncommon with huge repos - Microsoft have VFS for Git (although I hear that’s deprecated now), Meta have EdenFS, and Google has some proprietary solution.

    We have a hook that blocks find and grep because they can be extremely slow, and tells it to instead use some significantly faster MCP tools to search the codebase, powered by a search index with local changes overlaid.

    GPT-5.5 has no problem with this. Claude Opus mostly does it, but sometimes it loves to find workarounds rather than following the instructions. Things like: Try alternative commands like egrep. Create a symlink to grep and run that to see if it bypasses the filtering. Run it with a different shell like zsh. Write a Python script that execs grep. Write a Python script to reimplement grep.

    I’m trying Hermes Agent at home, but I have it in its own VM with restricted permissions.

    • Elvith Ma'for@feddit.org
      link
      fedilink
      arrow-up
      23
      ·
      edit-2
      8 hours ago

      Another thing Claude tried to do on my coworker’s machine yesterday was basically:

      ✨ Yes, that is easy, let me just generate a systems unit file for you…

      [Generates file]

      Should I install that unit now for you?

      Yes

      Alright, let me do that for you

      [Saves file]

      [Tries to run systemctl daemon reload]

      [Tries to activate the unit]

      It looks like I have insufficient rights to proceed, let me try another way…

      docker -rm -v /etc/systemd/system:/mount:Z -v ./unitfile.service:unit file.service:Z alpine /bin/sh cp ./unitfile.service /mount/

      Here, I installed the unit for you!

    • placebo@lemmy.zip
      link
      fedilink
      English
      arrow-up
      12
      ·
      8 hours ago

      Claude is in love with cli tools, it uses them for virtually everything these days in these long chains connected with && and |. This is probably pushing more and more people to let it run in the auto mode.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        3
        ·
        5 hours ago

        It makes sense… There’s a LOT of examples of using CLI tools in the training data. At work we’re moving away from MCP tools to instead using CLIs for everything.

    • bitjunkie@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      8 hours ago

      Just aliasing grep to ag solves both issues. I’m unsure as to whether there’s a pthread replacement for find, though.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        2
        ·
        5 hours ago

        ag / rg don’t work well in this particular scenario either. Because files are loaded on-demand, they end up trying to load the entire repo.