56 points Tomte 17 hours ago 11 comments

ylxdzsw 1 hour ago | parent

I'm not sure why almost all codemode implementations choose Javascript. I prototyped an agent[1] to use bash as the language for codemode, which in my opinion worked equally well and requires no teaching (there is literally 0 prompt to teach the LLM about codemode. A tool named "bash" is enough to have them know the usage).

[1] https://github.com/ylxdzsw/mu

searealist 1 hour ago | parent

Can do you make a tool or mcp call from bash?

clintonb 1 hour ago | parent

Yes. Invoking an MCP tool is just an HTTP call. You can do it with curl.

searealist 1 hour ago | parent

That's one kind of MCP. Another is a local stdio server.

Also there are things like subagents, etc (which may be considered tools).

the_mitsuhiko 1 hour ago | parent

> I'm not sure why almost all codemode implementations choose Javascript

Because the models are trained on JavaScript for code mode. You get away with way fewer instructions. They also want to be able to express concurrency and that works very well with the Promise global.

But a big reason is that code mode runs on the harness side so bash is a tricky target in particular.

Bonteq 17 minutes ago | parent

> However bash has one fundamental limitation which is that it can only compose programs that run. And there are some things, which are not programs, but native tools to the LLM and they sort of have to be.

The most obvious example here is `read` or `view_image`. If a multimodal model needs to read an image, it cannot use cat for that because the harness needs to inject the actual image payload into the protocol of the LLM.

Does your prototype overcome the limitations mentioned in the article?

andreypopp 3 minutes ago | parent

There's no limitation, just have bash commands `read` or `view_image` which communicate back to agent.

soltanov 1 hour ago | parent

Recovery after interrupted execution; distinguishing completed side effects from calls that can safely repeat.

aidiveyt 32 minutes ago | parent

subagents differ: in my claude code logs every subagent cache write is 5-minute tier, main session 1-hour

injidup 21 minutes ago | parent

How is this different to Claude writing mini scripts to get jobs done which it does quite often?

odo1242 12 minutes ago | parent

Claude’s scripts can’t call MCP tools, meaning everything has to be CLIs or libraries. At which point you lose the “everything has self-documenting input-output schema” that Codemode is going for.