zlacker

Show HN: NanoClaw – “Clawdbot” in 500 lines of TS with Apple container isolation

submitted by jimmin+(OP) on 2026-02-01 22:49:22 | 527 points 222 comments
[view article] [source] [go to bottom]

I’ve been running Clawdbot for the last couple weeks and have genuinely found it useful but running it scares the crap out of me.

OpenClaw has 52+ modules and runs agents with near-unlimited permissions in a single Node process. NanoClaw is ~500 lines of core code, agents run in actual Apple containers with filesystem isolation. Each chat gets its own sandboxed context.

This is not a swiss army knife. It’s built to match my exact needs. Fork it and make it yours.


NOTE: showing posts with links only show all posts
3. avaer+O1[view] [source] 2026-02-01 23:07:37
>>jimmin+(OP)

  Quick Start
  git clone https://github.com/anthropics/nanoclaw.git
Is this an official Anthropic project? Because that repo doesn't exist.

Or is this just so hastily thrown together that the Quick Start is a hallucination?

That's not a facetious question, given this project's declared raison d'etre is security and the subtle implication that OpenClaw is an insecure unreviewed pile of slop.

5. thepoe+I2[view] [source] 2026-02-01 23:15:09
>>jimmin+(OP)
One of the things that makes Clawdbot great is the allow all permissions to do anything. Not sure how those external actions with damaging consequences get sandboxed with this.

Apple containers have been great especially that each of them maps 1:1 to a dedicated lightweight VM. Except for a bug or two that appeared in the early releases, things seem to be working out well. I believe not a lot of projects are leveraging it.

A general code execution sandbox for AI code or otherwise that used Apple containers is https://github.com/instavm/coderunner It can be hooked to Claude code and others.

◧◩
6. kklisu+f3[view] [source] [discussion] 2026-02-01 23:19:24
>>avaer+O1
Claude hallucinated that repo here in this commit https://github.com/gavrielc/nanoclaw/commit/dbf39a9484d9c66b...
◧◩◪
9. mcinty+O3[view] [source] [discussion] 2026-02-01 23:22:50
>>kklisu+f3
I like that Claude's hypothesis was that Anthropic created openclaw and this anti-openclaw :)

> This is the anti-[OpenClaw](https://github.com/anthropics/openclaw).

11. hebeje+L4[view] [source] 2026-02-01 23:29:17
>>jimmin+(OP)
I think these days if I’m going to be actively promoting code I’ve created (with Claude, no shade for that), I’ll make sure to write the documentation, or at the very least the readme, by hand. The smell of LLM from the docs of any project puts me off even when I like the idea of the project itself, as in this case. It’s hard to describe why - maybe it feels like if you care enough to promote it, you should care to try and actually communicate, person to person, to the human being promoted at. Dunno, just my 2c and maybe just my own preference. I’d rather read a typo-ridden five line readme explaining the problem the code is there to solve for you and me,the humans, not dozens of lines of perfectly penned marketing with just the right number of emoji. We all know how easy it is to write code these days. Maybe use some of that extra time to communicate with the humans. I dunno.

Edit: I see you, making edits to the readme to make it sound more human-written since I commented ;) https://github.com/gavrielc/nanoclaw/commit/40d41542d2f335a0...

◧◩
14. 101008+U5[view] [source] [discussion] 2026-02-01 23:40:28
>>hebeje+L4
I agree 100% with you. It's even worse though. They haven't checked if the Readme has hallucinated it or not (spoiler: it has):

>>46850317

18. dceddi+O8[view] [source] 2026-02-02 00:05:27
>>jimmin+(OP)
This look nice! I was curious about being allowed to use a Claude Pro/Max subscription vs an API key, since there's been so much buzz about that lately, so I went looking for a solid answer.

Thankfully the official Agent SDK Quickstart guide says that you can: https://platform.claude.com/docs/en/agent-sdk/quickstart

In particular, this bit:

"After installing Claude Code onto your machine, run claude in your terminal and follow the prompts to authenticate. The SDK will use this authentication automatically."

◧◩◪
39. dceddi+Ag[view] [source] [discussion] 2026-02-02 01:17:09
>>jimmin+wb
I went down this rabbit hole a bit recently trying to use claude inside fence[0] and it seems that on macOS, claude stores this token inside Keychain. I'm not sure there's a way to expose that to a container... my guess would be no, especially since it seems the container is Linux, and also because keeping the Keychain out of reach of containers seems like it would be paramount. But someone might know better!

0: https://github.com/Use-Tusk/fence

◧◩◪
51. ceroxy+En[view] [source] [discussion] 2026-02-02 02:19:59
>>joshst+Yj
Didn't Thariq make it clear three weeks ago when they shut down 3rd party tool access and the OpenCode users were upset?

> Third-party harnesses using Claude subscriptions create problems for users and are prohibited by our Terms of Service.

https://xcancel.com/trq212/status/2009689809875591565

◧◩◪◨⬒
57. hypera+pr[view] [source] [discussion] 2026-02-02 02:59:23
>>overga+7p
This is my understanding as well. If GPT made money the companies that run them would be publicly traded?

Furthermore, companies which are publicly traded show that overall the products are not economical. Meta and MSFT are great examples of this, though they have recently seen opposite sides of investors appraising their results. Notably, OpenAI and MSFT are more closely linked than any other Mag7 companies with an AI startup.

https://www.forbes.com/sites/phoebeliu/2025/11/10/openai-spe...

◧◩◪◨⬒
67. sothat+yz[view] [source] [discussion] 2026-02-02 04:29:10
>>overga+7p
Dario Amodei has said that their models actually have a good return, even when accounting for training costs [0]. They lose money because of R&D, training the next bigger models, and I assume also investment in other areas like data centers.

Sam Altman has made similar statements, and Chinese companies also often serve their models very cheaply. All of this makes me believe them when they say they are profitable on API usage. Usage on the plans is a bit more unknown.

[0] https://youtu.be/GcqQ1ebBqkc?si=Vs2R4taIhj3uwIyj&t=1088

69. walter+xB[view] [source] 2026-02-02 04:49:58
>>jimmin+(OP)
> found it useful but running it scares

https://maordayanofficial.medium.com/the-sovereign-ai-securi...

  At least 42,665 instances are publicly exposed on the internet, with 5,194 instances actively verified as vulnerable through systematic scanning..  The narrative that “running AI locally = security and privacy” is significantly undermined when 93% of deployments are critically vulnerable. Users may lose faith in self-hosted alternatives.. Governments and regulators already scrutinizing AI may use this incident to justify restrictions on self-hosted AI agents, citing security externalities.
◧◩◪
74. TheDon+8G[view] [source] [discussion] 2026-02-02 05:41:22
>>selkin+ao
"much better isolation than containers"

If you've got an exploit for docker / linux containers, please share it with the class.

What I'm saying is that in practice, containers and VMs have both been quite secure.

Also, you can configure docker to run microvms too https://github.com/firecracker-microvm/firecracker-container...

◧◩
110. swyx+VV[view] [source] [discussion] 2026-02-02 08:40:04
>>hebeje+L4
orrrr you could go the other way and read explicitly ai-generated docs that use the code as source of truth https://deepwiki.com/gavrielc/nanoclaw
◧◩◪◨
111. swyx+2W[view] [source] [discussion] 2026-02-02 08:41:40
>>ceroxy+En
i think thats conflating two things (am not an expert). opencode exploited unauthorized use/api access, but obviously whatever that is using claude code sdk is kosher because its literally anthropic's blessed way to do this

thariq did a good intro here https://www.youtube.com/watch?v=TqC1qOfiVcQ

113. aitchn+eX[view] [source] 2026-02-02 08:57:53
>>jimmin+(OP)
That Baileys api for Whatsapp may (AFAICT) put you in thin ice with Meta. Is there a cheap legit alternative?

https://baileys.wiki/docs/intro/

◧◩
114. raahel+zX[view] [source] [discussion] 2026-02-02 09:02:05
>>hebeje+L4
You will definitely like Josh Mock's recent post: https://joshmock.com/post/2026-agents-md-as-a-dark-signal/
◧◩
117. dandak+NY[view] [source] [discussion] 2026-02-02 09:16:45
>>aitchn+eX
I was using WAHA. It is an abstraction layer with a proper API on top. It supports many engines like Baileys and Whatsmeow (golang).

Unfortunately, all those solutions are shaky and could lead to a ban on your account.

https://waha.devlike.pro/

◧◩◪
123. reasse+021[view] [source] [discussion] 2026-02-02 09:48:46
>>random+501
Found the spec here: https://github.com/gavrielc/nanoclaw/blob/main/docs/SPEC.md

The scheduled tasks seem like the major functional difference. Pretty cool.

Has anyone tried Anthropic’s “Cowork”? How does that compare?

◧◩◪◨⬒⬓⬔
159. satvik+sG1[view] [source] [discussion] 2026-02-02 14:52:18
>>techpr+4d1
It depends how much money and energy in the form of manhours were spent to write it in an artisan way in the first place. I've been in a lot of PR reviews where it was clear that the amount of back and forth we had was simply not worth it for the code we wrote.

I'm reminded of this: https://xkcd.com/1205/

◧◩◪◨
180. chasd0+fa2[view] [source] [discussion] 2026-02-02 17:22:00
>>hugeac+K6
i think about this xkcd all the time, just colors on a screen in a pattern.

https://imgs.xkcd.com/comics/computer_problems.png

◧◩◪◨⬒⬓
194. overga+WA2[view] [source] [discussion] 2026-02-02 19:33:43
>>sothat+yz
> Sam Altman has made similar statements, and Chinese companies also often serve their models very cheaply.

Sam Altman got fired by his own board for dishonesty, and a lot of the original OpenAI people have left. I don't know the guy, but given his track record I'm not sure I'd just take his word for it.

As for chinese models..: https://www.wheresyoured.at/the-enshittifinancial-crisis/#th...

From the article:

> You’re probably gonna say at this point that Anthropic or OpenAI might go public, which will infuse capital into the system, and I want to give you a preview of what to look forward to, courtesy of AI labs MiniMax and Zhipu (as reported by The Information), which just filed to go public in Hong Kong.

> Anyway, I’m sure these numbers are great-oh my GOD!

> In the first half of this year, Zhipu had a net loss of $334 million on $27 million in revenue, and guess what, 85% of that revenue came from enterprise customers. Meanwhile, MiniMax made $53.4 million in revenue in the first nine months of the year, and burned $211 million to earn it.

219. hitsma+PP7[view] [source] 2026-02-04 01:47:13
>>jimmin+(OP)
https://github.com/gavrielc/nanoclaw/commit/22eb5258057b49a0... Is this inserting an advertisement into the agent prompt?
[go to top]