iToverDose/Startups· 1 MAY 2026 · 01:30

Portable Coding Agent Harness in 400 Lines of Shell

A developer has created a full coding-agent harness in just 400 lines of shell code, with features like REPL and auto-compaction, using only system primitives

Hacker News2 min read0 Comments

Creating a portable coding agent harness is a challenging task, but one developer has managed to achieve it in just 400 lines of shell code. The harness, called Pu.sh, is a remarkable example of what can be accomplished with limited dependencies and a focus on system primitives.

Background and Development

The developer started by experimenting with pi-autoresearch, giving it a sample task to build a portable coding agent. The first version was 6 KB of shell code, which was great for one-time use but unusable for interactive tasks. The developer was surprised that it actually worked and decided to build upon it, adding features while keeping the codebase under 500 lines.

Features and Limitations

The resulting harness, Pu.sh, is an impressive collection of tools and features, including support for Anthropic and OpenAI, a REPL, auto-compaction, and checkpoint/resume functionality. It also includes pipe mode and 90 no-API tests. However, it lacks a text-based user interface, streaming, image support, OAuth, and Windows compatibility. The developer acknowledges that the code is not easy to read and that they stole and modified the system prompt and architecture from other sources.

Inspiration and Credits

The developer credits pi.dev as a major inspiration for the project, using the same 7-tool surface and exact-text edit model. They also mention that the agent loop itself is relatively small, and most of the code is dedicated to providing a good user experience and hardening the harness. The developer suggests that users can build their own harness exactly how they like it, citing Mario Zechner's AI Engineer talk on taking back control of tools.

Conclusion and Future Directions

The creation of Pu.sh is a testament to the power of simplicity and the importance of system primitives in building portable and efficient coding agent harnesses. As the field of artificial intelligence continues to evolve, it will be interesting to see how projects like Pu.sh contribute to the development of more advanced and user-friendly coding tools. With its focus on portability and minimal dependencies, Pu.sh has the potential to inspire a new generation of coding agents and harnesses.

AI summary

Portatif ve etkileşimli kodlama aracı oluşturma projesi, 400 satırdan oluşan bir shell betiği ile gerçekleştirildi. Geliştiriciler için önemli bir araç olabilir.

Comments

00
LEAVE A COMMENT
ID #HYYAQI

0 / 1200 CHARACTERS

Human check

3 + 8 = ?

Will appear after editor review

Moderation · Spam protection active

No approved comments yet. Be first.