‹ BackHN Continuity

Thread

You said no MCP

682 points · 362 comments · yarapavan

  1. raincole · · focus · HN ↗
    I'm still confused about what this codemode is. Models have been trained to chain bash and other typical unix tools well. They're so good at that to an uncanny level. Why do we want to not utilize this ability? Is it just a permission management issue in case you don't want the model to use shell directly?
    1. agentdev001 · · focus · HN ↗
      From my understanding, code mode came about due to some agents not having access to a shell.
      1. andrewingram · · focus · HN ↗
        The value is that rather than an agent chaining together tool calls itself (which means each step sends the result back to the agent for it to analyse and work out what to do next), it writes a script for the harness to execute that chains together all the calls. The major benefits are:

        * speed - much fewer hops back to the LLM

        * fewer tokens - intermediate execution steps in the script don't leak into context, only the final result does.

        * repeatability - if the LLM needs to repeat work, it can reuse a script it wrote last time.

        If you have a harness that has access to a full shell and knows how to use bash or python, you'll often see it writing little scripts. For setups that don't (ie normal model API requests with tool calls), you can give it an lightweight secure execution environment like just-bash, or quickjs.

        1. dools · · focus · HN ↗
          Agents just do this anyway, how is it a “mode”? I always see the agent writing scripts in a tmp dir to execute or even just inlining bash and python scripts.
          1. Cilvic · · focus · HN ↗
            but these bash scripts can not execute MCP tools.

            What if I have an MCP Tool LookupZip(City) and want to chain it with a bash tool that prodcues a list of 100 cities. And then I want to filter again to the largest Zip code.

            1. jsw97 · · focus · HN ↗
              Yeah but arguably that tool should be a cli anyway, or could easily be converted to one. The benefit of MCP is that it's _less_ capable than bash.
              1. agentdev001 · · focus · HN ↗
                Not in my testing. A lot of the benefit comes from the tool definitions (from mcp) existing in the context window of the first turn. You could replicate this of course by describing your cli tool in the initial user/system prompt- but, mcp is already 'built' for this at the client (harness) level generally.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.