Software

NanoClaw's Founder Rejected OpenClaw Over Half a Million Lines of Code—and Built His Own

Gavriel Cohen discovered his own package bundled into OpenClaw and found security gaps that convinced him the project was fundamentally broken. He rebuilt from scratch, betting on containers and isolation to win over enterprise users.

8 min read
Gavriel Cohen found his own code inside OpenClaw, so he walked away

When Gavriel Cohen first encountered OpenClaw, he saw immediate potential for his work. At that moment, Cohen—who would go on to establish NanoClaw and NanoCo AI—had stepped away from development to focus on marketing initiatives.

Cohen recounts to The New Stack that he was actively experimenting with Anthropic's Claude Code, which reignited his passion for programming, when he stumbled upon what was originally called Clawd Bot (the earlier incarnation of OpenClaw).

I had my first little go. I installed it, connected it to my WhatsApp, sent a few messages back and forth. So I came to it really from a need as we were building an AI native marketing agency.

Gavriel Cohen

Before this discovery, Claude Code itself—featuring its command-line interface for interacting with large language models—had sparked a crucial realization. "I immediately tried it, and that was a big mental unlock, so around March of 2025 I knew I needed to start building again," Cohen explains. Previously, he had worked as a developer at Wix, the no-code website builder headquartered in Tel Aviv.

Cohen recognized something missing from his development process. "I was mapping out what I needed, and I actually bought a Mac mini just to run Claude Code in the background and set up scheduled recurring jobs." This led him to deepen his involvement with OpenClaw.

A self-built package surprise

The problems surfaced remarkably quickly. "It was pretty immediate," Cohen recalls. "I was going through the setup that gives you all these options for different packages to install — and one of them was a package that I had built a few months before called NanoPDF. I saw that and thought, 'Why did they include that tiny package?'"

Typically, developers expect to encounter only established, well-tested third-party tools in such recommendations. Cohen's package hardly fit that description—it had minimal stars and hadn't received updates in months.

The concerns multiplied. "Then in the first day or two I was debugging, after a scheduled job didn't fire, and I saw the logs of all the WhatsApp messages — not just the one group that I connected it to, but all of them."

The fatal half-million lines

Gavriel Cohen

Carelessness combined with inadequate security practices represents a serious warning sign for any developer. Cohen brings up this concern repeatedly during his conversation with The New Stack, and for good reason: while policies can be adjusted and coding standards tightened, once a codebase spirals into an unmanageable state, recovery becomes nearly impossible. Even open source initiatives can only accommodate so much community review. By February, OpenClaw faced more than 3,000 unresolved pull requests.

But most importantly, I looked at the code base, and it's like a half a million lines of code.

Gavriel Cohen

Cohen's marketing operation employed just three people. "We had customers, so I wanted to have an agent for each customer, but I couldn't connect this thing to my customer data, and I couldn't build a business on top of it," he says.

Cohen took the only path forward he could see. "I sat down to build NanoClaw. I had to make this super small because in order for anybody who cares about security to use it, they're going to have to be able to look over the code and actually see what's going on and be OK with it."

At this juncture, understanding OpenClaw's underlying structure becomes instructive. Cohen breaks down the architecture: "So at the core, you have a coding agent. It can write code and run Bash commands, so you need a persistent environment session. And then you have to connect to a messaging app. And then the fourth thing is connection to the internet."

He elaborates further: "From those 4 fundamental capabilities you can build out everything else. And it is proactive because once you start scheduling jobs, it's no longer just reacting to what you're saying. You can write a claw agent in as little as 25 lines."

Despite OpenClaw's obvious limitations, Cohen remains firm in his diagnosis. "I think it was fundamentally flawed from the beginning, and the fatal flaw is half a million lines of code." (Current data shows OpenClaw now exceeds 800,000 lines of code). Even following OpenAI's acquisition of OpenClaw, usability challenges persisted, and community participation has declined significantly.

Has NanoClaw simplified the installation experience? Cohen paused thoughtfully before responding. "I still think of NanoClaw, for the most part, as suited to technical people — not necessarily developers, but those comfortable with the terminal and GitHub. NanoClaw is not shipped as a binary. Everybody runs it from source."

The redesigned version includes an interactive terminal-based setup script that guides users through each step. When installation complications arise, the system delegates troubleshooting to Claude. Cohen expresses reservations about this approach; involving Claude introduces security considerations. "If you don't understand the security model and you're just running Claude, it can break the security model or remove the sandboxing."

On the subject of containerization: what motivated NanoClaw to adopt this technology, and has it become a competitive advantage?

Why containers won

"When I actually sat down to write NanoClaw, I just started from an empty project, and I didn't tell Claude Code to go look at OpenClaw," Cohen explains. "I just described the capabilities. I said I want a messaging app; a coding agent; I want it in a loop and I want memory and I built it from scratch."

As development progressed, fresh challenges emerged. "I thought: which tools should I give it? I don't want it to be limited and unable to run bash commands, but if I want to let it run any command, it's got to be in an isolated environment." Cohen continues:

I can't just have it running on my machine with an autonomous agent able to do everything, so I put it in an isolated container.

Gavriel Cohen

This containerization strategy ultimately became a distinguishing feature for NanoClaw.

One detail stands out from Cohen's account: "We started with Apple containers."

"I was running it on a Mac mini, and I was vaguely aware that Apple had added this new native container capability. That worked really well initially, but when thousands of people started using it, everybody wondered, 'What are you doing with Apple containers? Docker is the default; it's a standard that works everywhere.' So I supported both and then within a few weeks I just changed the default to Docker containers."

NanoClaw established a partnership with OneCLI to leverage their credential management and proxying infrastructure for enhanced security. However, this integration represents a meaningful shift in approach. "The user base and the community gets it," Cohen observes. "Before we had that partnership, there was a major issue with credentials entering the agent environment that we were trying to prevent — but, for example, you need to get the Anthropic token in place so that the agent can connect."

Initially, NanoClaw developed an internal proxying system, but complexity mounted. "OneCLI was a very natural partnership, and the user base was happy to have a proper solution. We also have human-in-the-loop approvals, and set policies around — for example — how your agent can use Gmail."

Vercel frequently appears in discussions surrounding NanoClaw. What does the actual partnership entail, and where does it rank in development priorities?

"Vercel created this great open-source package called Chat SDK, which gives you standardized connections to about 15 or 20 different messaging apps. One of the core philosophies I came to NanoClaw with is don't reinvent the wheel. Why should everybody be re-implementing the same integrations with messaging apps — let's have one library that we all congregate around."

OpenClaw has essentially established itself as a distinct software category. What must NanoClaw accomplish over the coming year to not merely fill the void but reshape the landscape?

"What we've been doing with credential proxies, human-in-the-loop approvals, and building with isolation of agents is tackling head-on the big hairy problems and challenges that stand between using autonomous agents with their full power, while doing it in a way that's safe."

Building for the enterprise

"In the next few months, we are looking at large business enterprises that have strict security requirements, compliance requirements, regulatory requirements, etc. So we've already gotten to the point where we have the offering where you can connect to your email, you can connect to your calendar and do that safely where any sensitive action has approval."

Penetrating the enterprise market will undoubtedly test any emerging company. Yet NanoClaw has identified its target clearly, positioning itself as a credible contender as rivals vie for dominance in the space OpenClaw has vacated.

Source: The New Stack

Source: The New Stack · Reporting supplemented by The Silicon Ledger staff.