News for hackers. Stuff that matters.
Re:OpenCode – The open source AI coding agent by hippycruncher22 on Friday March 20, 2026 @06:28PM (#47461565)
I'm a https://pi.dev man myself.
Re:OpenCode – The open source AI coding agent by wyre on Friday March 20, 2026 @08:19PM (#47462663)
Same.

I’m sure there’s a more elegant way to say this, but OpenCode feels like an open source Claude Code, while pi feels like an open source coding agent.

Re:OpenCode – The open source AI coding agent by 6ak74rfy on Friday March 20, 2026 @09:02PM (#47462957)
Same.

Pi is refreshingly minimal in terms of system prompts, but still works really well and that makes me wonder whether other harnesses are overdoing. Look at OpenCode's prompts, for instance - long, mostly based on feels and IMO unnecessary. I would've liked to just overwrite OC's system prompts with Pi's (to get other features that Pi doesn't have) but that isn't possible today (without maintaining a custom fork)

Re:OpenCode – The open source AI coding agent by Richard_Jiang on Friday March 20, 2026 @09:18PM (#47463058)
Pi is a great project, and the lightweight Agent development is really recommended to refer to Pi's implementation method.
Re:OpenCode – The open source AI coding agent by cmrdporcupine on Friday March 20, 2026 @09:24PM (#47463098)
Pi is good stuff and refreshingly simple and malleable.

I used it recently inside a CI workflow in GitLab to automatically create ChangeLog.md entries for commits. That + Qwen 3.5 has been pretty successful. The job starts up Pi programatically, points it at the commits in question, and tells it to explore and get all the context it needs within 600 seconds... and it works. I love that this is possible.

Re:OpenCode – The open source AI coding agent by krzyk on Saturday March 21, 2026 @02:31AM (#47464509)
Why most of those tools are written in js/ts?

JS is not something that was developed with CLI in mind and on top of that that language does not lend itself to be good for LLM generation as it has pretty weak validation compared to e.g. Rust, or event C, even python.

Not to mention memory usage or performance.

Re:OpenCode – The open source AI coding agent by manmal on Saturday March 21, 2026 @02:58AM (#47464635)
For a TUI agent, runtime performance is not the bottleneck, not by far. Hackability is the USP. Pi has extensions hotreloading which comes almost for free with jiti. The fact that the source is the shipped artifact (unlike Go/Rust) also helps the agent seeing its own code and the ability to write and load its own extensions based on that. A fact that OpenClaw’s success is in part based on IMO.

I can’t find the tweet from Mario (the author), but he prefers the Typescript/npm ecosystem for non-performance critical systems because it hits a sweet spot for him. I admire his work and he’s a real polyglot, so I tend to think he has done his homework. You’ll find pi memory usage quite low btw.

Re:OpenCode – The open source AI coding agent by krzyk on Saturday March 21, 2026 @05:23AM (#47465463)
OK, make sense, but there are also claw clones that are in Rust (and self modifying).

Also python ones would also allow self modifying. I'm always puzzled (and worried) when JS is used outside of browsers.

I'm biased as I find JS/TS rather ugly language compared to anything other basically (PHP is close second). Python is clean, C has performance, Rust is clean and has performance, Java has the biggest library and can run anywhere.

Re:OpenCode – The open source AI coding agent by manmal on Sunday March 22, 2026 @03:24AM (#47475248)
I see we have very different taste in languages. I can’t stomach Python, or Ruby for that matter. Personally, TS has a genius type system.
Re:OpenCode – The open source AI coding agent by ngrilly on Tuesday March 24, 2026 @09:41AM (#47502475)
Re:OpenCode – The open source AI coding agent by the_mitsuhiko on Saturday March 21, 2026 @05:23AM (#47465460)
In pi’s case there is a plugin system. It’s much easier to make a self extending agent work with Python or JavaScript than most other languages. JavaScript has the benefit that it has a great typing system on top with TypeScript.
Re:OpenCode – The open source AI coding agent by solarkraft on Saturday March 21, 2026 @08:44AM (#47466531)
TS is just a boring default.

It’s simply one of the most productive languages. It actually has a very strong type system, while still being a dynamic language that doesn’t have to be compiled, leading to very fast iteration. It’s also THE language you use when writing UIs. Execution is actually pretty fast through the runtimes we have available nowadays.

The only other interpreted language is Python and that thoroughly feels like a toy in comparison (typing situation still very much in progress, very weak ORM situation, not even a usable package manger until recently!).

Re:OpenCode – The open source AI coding agent by jpc0 on Saturday March 21, 2026 @11:41AM (#47468017)
> It’s also THE language you use when writing UIs

I'm unsure that I agree with this, for my smaller tools with a UI I have been using rust for business logic code and then platform native languages, mostly swift/C#.

I feel like with a modern agentic workflow it is actually trivial to generate UIs that just call into an agnostic layer, and keeping time small and composable has been crucial for this.

That way I get platform native integration where possible and actual on the metal performance.

Re:OpenCode – The open source AI coding agent by plipt on Saturday March 21, 2026 @11:19AM (#47467834)
If Python has a "very weak ORM situation", what is it about the TS ORM scene that makes it stronger by comparison? Is there one library in particular that stands out?
Re:OpenCode – The open source AI coding agent by _ache_ on Saturday March 21, 2026 @09:49AM (#47467016)
I was going to say that pnpm isn't that old but wikipedia says 2017!
Re:OpenCode – The open source AI coding agent by solarkraft on Saturday March 21, 2026 @11:10AM (#47467737)
pnpm is amazing for speed and everybody should use it! but even with npm before it, at least it was correct. I had very few (none?) mysterious issues with it that could only be solved by nuking the entire environment. That is more than I can say about the python package managers before uv.
Re:OpenCode – The open source AI coding agent by theshrike79 on Saturday March 21, 2026 @11:52AM (#47468139)
uv + PEP723 is amazing for CLI tools

You download one .py, run it and uv automatically downloads and installs any requirements to a virtual environment and runs it

Re:OpenCode – The open source AI coding agent by maleldil on Saturday March 21, 2026 @12:40PM (#47468601)
Has the developer tooling been fixed? Doesn't it use an ephemeral environment? How do editors/LSPs know where to get dependency information?
Re:OpenCode – The open source AI coding agent by pontussw on Saturday March 21, 2026 @02:57AM (#47464633)
Same here!

The simplicity of extending pi is in itself addictive, but even in its raw form it does the job well.

Before finding pi I had written a lot of custom stuff on top of all the provider specific CLI tools (codex, Claude, cursor-agent, Gemini) - but now I don’t have to anymore (except if I want to use my anthropic sub, which I will now cancel for that exact reason)

Re:OpenCode – The open source AI coding agent by szatkus on Saturday March 21, 2026 @05:20AM (#47465444)
I just found out about pi yesterday. It's the only agent that I was able to run on RISC-V. It's quite scary that it runs commands without asking though.
Re:OpenCode – The open source AI coding agent by theshrike79 on Saturday March 21, 2026 @11:54AM (#47468161)
It has zero safeguards by default

But the magic is that it knows how to modify itself, if you need a plan mode you can ask it to implement it :)

Re:OpenCode – The open source AI coding agent by vorticalbox on Saturday March 21, 2026 @07:12AM (#47465985)
> Sessions are stored as trees

that is actually really nice

Re:OpenCode – The open source AI coding agent by onetom on Saturday March 21, 2026 @10:30AM (#47467375)
Pi is the Emacs of coding AI agents.

It's a pity it's written in TS, but at least it can draw from a big contributor pool.

There is https://eca.dev/ too, which might worth considering, which is a UI agnostic agent, a bit like LSP servers.