I was expecting a bit more care from Armin in explaining what does codemode actually do, from first principles.
Or 4 paragraphs https://news.ycombinator.com/item?id=49990199
Or 1.5: https://news.ycombinator.com/item?id=49989503
Or essentially 4 again: https://news.ycombinator.com/item?id=49989503
Or literally 1 sentence: https://news.ycombinator.com/item?id=49992276
etc.
----
Honestly, psychologists need to study AI psychosis in depth when people become so enamoured with bullshit, they will spend any and all amount of words inventing new useless bullshit like "hands and brain" for the simplest concepts.
It means that a LLM side tool (bash) can expose larger (and structured) outputs to Codemode than it normally does when that tool is executed straight to the LLM back as text.
Cloudflare Blog actually makes a good job explaining it at the very top, also in one sentence: "Convert the MCP tools into a TypeScript API, and then ask an LLM to write code that calls that API.". The rest of the blog post could probably be skipped :)
However, natively, the model has no way of composing the tools it sees that it can call. It cannot say, effectively, "use the output of the get_email_id tool, as input for the get_email_Metadata tool."
This is what codemode is. Allowing for the model to interact with the tools that the harness exposes, programmatically.
So, TLDR; Codemode allows for composing at the harness level, rather than just at the inner-tool level.
It doesn't help that the article is titled "What is Codemode" and then goes to say "If you are not familiar with Codemode, it’s basically just...". You article is supposed to say what it is without anyone being familiar with it.
Like what does this passage even mean:
--- start quote ---
For instance if you issue a bash call as a regular tool call in the LLM, then we only throw the trailing 2000 lines into the context and if the agent wants more, it needs to look at the overflow file itself. If however the agent issues that invocation via Codemode, then the Codemode side gets larger outputs sent structurally.
--- end quote ---