A few people have been asking about it, so I wanted to share my AI agentic workflow, and how I have been using AI to help program native C++ Haiku applications. I use AI agents a lot in my work as a data engineer, so when I read talk about Claude Code working under Haiku, I got excited. I wrote a handful of BeOS MIDI apps 20-25 years ago and I figured it would be neat to bring these up to date and fix bugs quickly with what limited free time I have. I did manage to get Claude working under Haiku for exactly one or two prompts, then it hung, then it just disappeared. I don’t think Claude liked the old version it was running, as new versions require compilation and no longer work on pure js. So where did that leave me? A hybrid approach of using AI agents on Windows to program native apps for Haiku.
haiku-reference-md
My first attempts were not great. While AI agents are great for writing Web based apps, or helping me sort out my database at work, they definitely fall short for a niche hobby API. Unless you give them the tools they need. After seeing it referring to the online HaikuBook and source, over and over again, I realized what it really needed was its own local primary sources. I achieved this using Antigravity/Gemini for Windows and created a series of python scripts to create .md file for agentic use. There is a script for the HaikuBook, BeBook, Haiku Internals, and Haiku Deep Wiki. They can all be found at my public repo GitHub - dcbeckman/haiku-reference-md: A Python script to pull the Haiku Book API reference material to a local knowledge base, in order to help keep AI coding agents on track. · GitHub Fee free to edit, adapt, and contribute your own knowledge bases if you think they are helpful for Haiku development. After pointing the agents to use it first as their primary sources, I noticed a marked improvement in Haiku development.
Sparse Checkout
Even with more grounded source materials, you will run into issues at some point. What really moved Claude Code in particular from an adequate Haiku programmer with the .md files to a Haiku engineer was having a local repo of Haiku source code to look at. Basically, you just inform your AI agent to use it as another primary source, and to “feel free to sparse checkout relevant Haiku source code to the [path]/haiku folder”. Then you just automatically get the relevant code you need for the tasks relevant to you, rather than having to check out the entire OS branch. The smaller source footprint also benefits the AI agent.
God-mode
At this point we were really cooking, but I ran into more bugs. I haven’t mentioned the setup between the two systems yet, so now would be a good time. On the Windows machine, I have a main repos directory with all of my projects. I use Antigravity for research, planning, scripts, and lightweight Haiku coding. I use Claude Code for more advanced coding and debugging needs. I also have the various projects setup in the Home folder of my Haiku machines (one x86 the other 64). Up to this point I was gitting on the Haiku side manually, and then I was like, why don’t I just give Claude ssh access? I mean sure it’s running as root since that is all that BeOS/Haiku allow. But it is also a hobby OS with no personal or sensitive data, just my repos, which the agents already have access to. So, a manual key generation later and Claude had the keys to the kingdom.
With ssh access, Claude went to work as a master debugger. One thing you need to do though is inform your AI to keep track of ssh sessions and not leave tests running in the background. After that, the agent was careful not to leave ssh running, but instead enable logging, and then come back to check on the logs later. This also cuts down on usage, because the AI doesn’t have to monitor things constantly.
I hope this information is useful for some of you, to help you with your Haiku endeavors.