1. Home
  2. The Room Podcast

Sep 29

How to sandbox rogue AI agents

Gavriel Cohen

Read only

Overview

Gavriel Cohen tells Claudia Laurie and Madison McIlwain how he left an ultra-Orthodox community to build a viral open-source AI project, and how organizations can deploy autonomous agents safely.

3 things to know

Singapore's Foreign Minister calls NanoClaw his diplomat second brain

Gavriel Cohen says the Minister of Foreign Affairs of Singapore publicly posted on X about using NanoClaw for speeches, policy prep, and trip planning, calling the tool his diplomat second brain.

More

While powerful coding agents like Cursor and Claude Code have existed for about 1.5 years, they required developers to babysit them and approve every action. A "Claw" (pioneered by OpenClaw) runs in "YOLO mode" (approve all) connected to hundreds or thousands of tools, operates in a single endless conversation thread to build persistent memory, has full access to a computer file system to install new libraries, schedules its own recurring tasks, and lives inside everyday messaging apps like Slack, Discord, Telegram, WhatsApp, and iMessage.

▶ Watch at 21:03

Cohen: NanoClaw still has not solved prompt injection completely

Gavriel Cohen admits NanoClaw has not solved all AI security and prompt injection problems, so his team puts full-powered coding agents inside a strict container that limits what external systems and data they can touch.

More

Although OpenClaw demonstrated massive utility, Cohen notes it had severe security issues and was not production-ready. Rather than reducing ("nerfing") an agent's capabilities, NanoClaw places a full-powered coding agent inside a strict container ("a box") where it can operate freely internally, while strictly controlling what data enters the box and what external systems the agent can touch. But there's so much value to unlock that if we can solve a piece of it and just get it to the point where I can put this into a company, maybe it's not connected to everything yet, but it's connected to some things..."

▶ Watch at 14:30

Cohen: Running AI every 10 minutes gets subscriptions cut

Gavriel Cohen explains that running a language model every 10 minutes to monitor social media burns so many usage units that providers like Claude cut off subscription access, so NanoClaw runs a simple code script first before waking the agent.

More

In late February, NanoClaw implemented a feature where the agent writes a lightweight deterministic code script that runs before a cron job fires to check if a condition has changed without an LLM involved, waking the agent up only if a change is detected. Cohen notes that Anthropic/Claude Code released a similar monitor feature about 1 month later.

▶ Watch at 42:51

Also in this episode

Cohen claims an email agent multiplies output up to fivefold

Gavriel Cohen claims a personal AI agent connected to email and calendar can make a human worker two to five times more effective, while keeping a real person accountable in ways an AI cannot be.

More

Because enterprises require human accountability (as you cannot put an agent on a performance improvement plan), agents should augment workers rather than replace them. He also claims NanoClaw is 3 to 4 months ahead of competitors (noting Claude's Slack integration still lacked human-in-the-loop approvals), though he hedges slightly: "I don't know if there's another business-ready agent that has that." Regarding agent-to-agent communication, Cohen hedges that it is "only just starting to work" and is "just at the edge, it's really starting to become useful right now."

▶ Watch at 40:35

Cohen says one Karpathy tweet made him fire clients

Gavriel Cohen says he and his brother Lazer grew an AI-native marketing agency pretty close to $1 million in annual recurring revenue by January, then shut it down and fired their clients after Andrej Karpathy tweeted about their side project, NanoClaw.

More

After moving to Israel, he caught up on high-school-level studies at age 22 for about 1 year using scholarships, and started at Tel Aviv University at age 23, completing a double major in physics and computer science without taking out loans. After working as a developer at Wix.com, he stopped software development for about 4 years to work at a PR agency founded by his brother and current co-founder, Lazer, where they worked with 50 to 70 Israeli tech startups, including Run:ai (acquired by Nvidia) and Pinecone (from stealth through Andreessen Horowitz's investment).

About 1 year prior to the podcast, the brothers started an AI-native marketing agency using Claude Code for non-coding tasks like research and content optimization, reaching pretty close to $1 million in ARR by January. Following a viral tweet about their side project NanoClaw by Andrej Karpathy, they abruptly shut down the agency and fired their clients to focus 100% on NanoClaw.

▶ Watch at 10:11

Quotes

“Let's take an agent, not limit what its capabilities are, so don't nerf it and reduce its capabilities, full-powered coding agent connected to all the tools, but limit what it can touch and what it can access. Limit the damage it can do by putting it in a box.”

▶ Watch at 14:54

“Ultimately, I don't want to have a quarterly review with an agent, and you can't put an agent on an improvement plan. And especially when you look at larger businesses, large corporations, Fortune 500 companies, those industries, the culture, they're not going to just be replacing people with agents.”

▶ Watch at 36:45

“Besides writing for itself this job that it does every X amount of time and setting for itself the prompt of what it should do when that job fires, it can also write a bit of code that runs before the job fires. And first the code runs, no agent involved, the code can check something, do a search and get a result and check if a certain word shows up there, and then only when that script identifies that something has changed or something needs to be done, that's when the agent kind of wakes up and kicks in and starts to do its work.”

▶ Watch at 43:25

5 more quotes

“All my agents I call Andy, after Andy Bernard from The Office. He's friendly, he's competent, but he's not your best buddy, right? You're not going to fall in love with him. So that's, I think, the right dynamic to have with an agent. We're not building boyfriends or girlfriends; they get work done.”

▶ Watch at 0:00

“When I graduated from religious high school at 18, I knew basic arithmetic. So then moved to Israel and started catching up on my studies at 22 years old, and spent about a year just catching up on high school-level studies, started university at 23, studied physics and computer science.”

▶ Watch at 4:36

“It turns out this was the Minister of Foreign Affairs of Singapore, and he is a major NanoClaw user personally. And he did this whole post publicly about how he's using it and how he's building it, and he says, 'This is my second brain, my diplomat second brain, and I wouldn't dare switch it off.'”

▶ Watch at 21:03

“We raised without a deck, right? And we raised, within a week got a term sheet, and we closed our funding round, it was about six weeks after I wrote the first line of code sitting on this couch over here.”

▶ Watch at 28:51

“And I would say restraint, right? Like the agents, you let them go, they'll build all kinds of things, they'll write all kinds of things, they'll go in all kinds of crazy directions. And I think we need to rein them in a little bit and exercise that restraint.”

▶ Watch at 33:53

Full summary

Episode Overview

  • Gavriel Cohen tells Claudia Laurie and Madison McIlwain how he went from leaving an ultra-Orthodox community to building NanoClaw, and how individuals and enterprises can deploy autonomous AI agents safely.
  • The conversation traces Cohen's unconventional path from learning high-school math at age 22 to running an AI-native marketing agency, and ultimately shutting that business down overnight when his open-source agent project went viral.
  • Cohen explains the architectural shift from traditional coding assistants to "Claw" agents that possess persistent memory, full file-system access, and direct integration into everyday messaging apps.
  • Listeners learn practical frameworks for sandboxing autonomous agents, conserving LLM tokens via pre-execution scripts, and maintaining human accountability inside agent-driven organizations.

Key Concepts

  • Unconventional Founder Background and Pivot to Open Source: Cohen grew up in Brooklyn as 1 of 11 children in an ultra-Orthodox Jewish community, decided to leave around age 15 or 16, and left home after graduating religious high school at 18 knowing only basic arithmetic. After moving to Israel, he caught up on high-school-level studies at age 22 for about 1 year using scholarships, and started at Tel Aviv University at age 23, completing a double major in physics and computer science without taking out loans. After working as a developer at Wix.com, he stopped software development for about 4 years to work at a PR agency founded by his brother and current co-founder, Lazer, where they worked with 50 to 70 Israeli tech startups, including Run:ai (acquired by Nvidia) and Pinecone (from stealth through Andreessen Horowitz's investment). About 1 year prior to the podcast, the brothers started an AI-native marketing agency using Claude Code for non-coding tasks like research and content optimization, reaching pretty close to $1 million in ARR by January. Following a viral tweet about their side project NanoClaw by Andrej Karpathy, they abruptly shut down the agency and fired their clients to focus 100% on NanoClaw.
  • Business Ties, Investors, and Episode Context: Cohen is the Co-Founder and CEO of NanoCo, the commercial entity behind the open-source NanoClaw platform. Co-host Claudia Laurie notes NanoClaw exploded to over 250,000 downloads and 30,000 GitHub stars, and Cohen states that about 3 months prior to the recording, tens of thousands of people and teams were using the open-source project. NanoCo raised an initial $12 million this year from investors including Valley Capital Partners (Mitchell and Stephen, who led the round), Slow Ventures (Sam Lessin), Docker (strategic investor), and Vercel. Cohen claims they raised without a pitch deck, received a term sheet within 1 week, and closed the round about 6 weeks after he wrote the first line of code on his couch; reflecting on an airport FaceTime pitch to Sam Lessin at Slow Ventures, Cohen admits that in retrospect, some of his ideas then were right and some were wrong. The podcast is recorded live from Vercel HQ, and Cohen explicitly praises and mentions using the "Vercel agent browser" in his personal agent setup. Additionally, co-host Madison McIlwain works at OpenAI, and the episode is sponsored by Rippling (Rippling AI), Gradial, and Ashhurst Perkins Coie.
  • The "Claw" Architecture vs. Traditional Coding Agents: While powerful coding agents like Cursor and Claude Code have existed for about 1.5 years, they required developers to babysit them and approve every action. A "Claw" (pioneered by OpenClaw) runs in "YOLO mode" (approve all) connected to hundreds or thousands of tools, operates in a single endless conversation thread to build persistent memory, has full access to a computer file system to install new libraries, schedules its own recurring tasks, and lives inside everyday messaging apps like Slack, Discord, Telegram, WhatsApp, and iMessage. When Cohen first put OpenClaw into a WhatsApp group to manage his sales pipeline, it acted as a sales manager giving briefings and reminders within 1 day, and the Minister of Foreign Affairs of Singapore even publicly posted on X/Twitter about using NanoClaw for speeches, policy prep, and trip planning, calling it his "diplomat second brain."
  • Sandboxing ("Putting the Agent in a Box") vs. Nerfing: Although OpenClaw demonstrated massive utility, Cohen notes it had severe security issues and was not production-ready. Rather than reducing ("nerfing") an agent's capabilities, NanoClaw places a full-powered coding agent inside a strict container ("a box") where it can operate freely internally, while strictly controlling what data enters the box and what external systems the agent can touch. Cohen explicitly hedges on whether AI security and prompt injection are fully solved, stating: "I'm not going to solve the whole thing, and we still haven't solved the whole thing. But there's so much value to unlock that if we can solve a piece of it and just get it to the point where I can put this into a company—maybe it's not connected to everything yet, but it's connected to some things..."
  • Pre-Execution Scripts for Token Conservation: Asking an agent to monitor social media every 10 minutes by running an LLM every 10 minutes burns massive tokens and causes providers like Claude to cut off subscription access. In late February, NanoClaw implemented a feature where the agent writes a lightweight deterministic code script that runs before a cron job fires to check if a condition has changed without an LLM involved, waking the agent up only if a change is detected. Cohen notes that Anthropic/Claude Code released a similar monitor feature about 1 month later.
  • Human-in-the-Loop Multiplication and Agent-to-Agent Readiness: Because enterprises require human accountability (as you cannot put an agent on a performance improvement plan), agents should augment workers rather than replace them. Cohen claims a main personal agent connected to email and calendar can make a human worker 2, 3, 4, or 5 times more effective. He also claims NanoClaw is 3 to 4 months ahead of competitors (noting Claude's Slack integration still lacked human-in-the-loop approvals), though he hedges slightly: "I don't know if there's another business-ready agent that has that." Regarding agent-to-agent communication, Cohen hedges that it is "only just starting to work" and is "just at the edge, it's really starting to become useful right now."

Quotes

  • At 0:00 - "All my agents I call Andy, after Andy Bernard from The Office. He's friendly, he's competent, but he's not your best buddy, right? You're not going to fall in love with him. So that's, I think, the right dynamic to have with an agent. We're not building boyfriends or girlfriends; they get work done." - Explaining why users should maintain a professional, tool-oriented boundary with AI agents.
  • At 4:36 - "When I graduated from religious high school at 18, I knew basic arithmetic. So then moved to Israel and started catching up on my studies at 22 years old, and spent about a year just catching up on high school-level studies, started university at 23, studied physics and computer science." - Detailing his rapid educational catch-up after leaving an ultra-Orthodox community in Brooklyn.
  • At 14:54 - "Let's take an agent, not limit what its capabilities are—so don't nerf it and reduce its capabilities—full-powered coding agent connected to all the tools, but limit what it can touch and what it can access. Limit the damage it can do by putting it in a box." - Defining the core security philosophy behind NanoClaw's sandboxing architecture.
  • At 21:03 - "It turns out this was the Minister of Foreign Affairs of Singapore, and he is a major NanoClaw user personally. And he did this whole post publicly about how he's using it and how he's building it, and he says, 'This is my second brain, my diplomat second brain, and I wouldn't dare switch it off.'" - Illustrating how high-level non-technical leaders are adopting open-source coding agents for daily knowledge work.
  • At 28:51 - "We raised without a deck, right? And we raised—within a week got a term sheet, and we closed our funding round, it was about six weeks after I wrote the first line of code sitting on this couch over here." - Highlighting the speed of NanoCo's $12 million fundraise following open-source traction.
  • At 33:53 - "And I would say restraint, right? Like the agents, you let them go, they'll build all kinds of things, they'll write all kinds of things, they'll go in all kinds of crazy directions. And I think we need to rein them in a little bit and exercise that restraint." - Warning developers against letting autonomous agents generate sprawling, unreviewed codebases or documents.
  • At 36:45 - "Ultimately, I don't want to have a quarterly review with an agent, and you can't put an agent on an improvement plan. And especially when you look at larger businesses, large corporations, Fortune 500 companies, those industries, the culture, they're not going to just be replacing people with agents." - Explaining why human accountability remains essential in enterprise organizational structures.
  • At 43:25 - "Besides writing for itself this job that it does every X amount of time and setting for itself the prompt of what it should do when that job fires, it can also write a bit of code that runs before the job fires. And first the code runs, no agent involved, the code can check something—do a search and get a result and check if a certain word shows up there—and then only when that script identifies that something has changed or something needs to be done, that's when the agent kind of wakes up and kicks in and starts to do its work." - Describing how to prevent recurring agent tasks from exhausting LLM token limits.

Takeaways

  • Sandbox agents rather than restricting their internal tools: Deploy full-powered agents inside isolated containers where they have freedom to execute code and install libraries, but place strict human-in-the-loop approval gates at the boundaries controlling what data enters and what external company systems they can modify.
  • Use deterministic pre-execution scripts for recurring monitoring: When setting up cron jobs (such as checking social media or APIs every 10 minutes), have the agent write a lightweight non-AI script to check for changes first so the LLM only wakes up and consumes tokens when action is required.
  • Accelerate employee onboarding via a founder's memory agent: Give new hires a brief 20 to 30 minute human orientation, and let them complete their onboarding by querying a central agent indexed on the past 5 months of company call notes and email threads.
  • Distill pre-coding alignment into 1-page visual HTML briefs: Before writing feature code, have developers brainstorm with their agents to generate a 1-page visual HTML summary (rather than a 12-page document) that highlights key decisions and open questions for human teammates to review.
  • Adopt a professional persona boundary with your agents: Treat AI agents strictly as competent work tools (like Cohen's "Andy Bernard" naming convention) and pair each human employee with a primary personal agent connected to their email and calendar to multiply their output without losing human accountability.

Watch the full episode 50 min

Read along with the audio summary

This episode covers Gavriel Cohen’s unconventional path from leaving an ultra-Orthodox community to building NanoClaw, alongside practical frameworks for deploying autonomous AI agents safely in the enterprise.

There are four key takeaways from this conversation. First, the shift from traditional coding assistants to autonomous Claw agents unlocks massive productivity through persistent memory and messaging app integration. Second, securing these agents requires strict container sandboxing rather than reducing their core capabilities. Third, teams must use deterministic pre-execution scripts to prevent recurring agent tasks from exhausting token limits. Fourth, organizations must maintain human accountability by using agents to multiply employee output rather than replace headcount.

Cohen’s journey began when he left an ultra-Orthodox community in Brooklyn at age eighteen knowing only basic arithmetic. After catching up on high school studies in Israel at age twenty-two and earning a degree in physics and computer science, he and his brother built an AI-native marketing agency nearing one million dollars in annual recurring revenue. However, after a side project called NanoClaw went viral following a post by Andrej Karpathy, they shut down the agency overnight to focus entirely on the open-source platform. NanoCo quickly raised twelve million dollars within six weeks of writing the first line of code, while accumulating over two hundred fifty thousand downloads and thirty thousand GitHub stars.

The core innovation driving this rapid adoption is the Claw architecture. Unlike traditional coding assistants that require constant developer supervision, a Claw agent operates autonomously in a single endless conversation thread to build persistent memory. It maintains full file-system access to install libraries, schedules its own recurring tasks, and lives inside everyday messaging apps like Slack, WhatsApp, and iMessage. This accessibility has led to widespread adoption beyond engineers, including Singapore's Minister of Foreign Affairs, who publicly described NanoClaw as his diplomat second brain for policy preparation and speechwriting.

To make these powerful agents safe for business, Cohen advocates for sandboxing rather than nerfing capabilities. Early autonomous agents suffered from severe security vulnerabilities. NanoClaw solves this by placing a full-powered coding agent inside a strict container where it can execute code freely, while tightly controlling what data enters the box and what external systems the agent can touch. While Cohen notes that prompt injection and AI security are not completely solved, combining isolated containers with human-in-the-loop approval gates unlocks immediate enterprise value.

Running autonomous agents continuously also introduces severe cost and rate-limit challenges. Asking an large language model to check social media or APIs every ten minutes quickly burns through token limits. To solve this, NanoClaw agents write lightweight, deterministic code scripts that run prior to scheduled jobs without invoking the AI. The script checks if a specific condition has changed, waking the language model up to consume tokens only when action is actually required.

Finally, deploying agents inside companies requires restraint and clear organizational boundaries. Because managers cannot put an AI on a performance improvement plan, enterprises require human accountability. Cohen recommends pairing each worker with a primary personal agent connected to their email and calendar, which can multiply human effectiveness by up to five times. Teams can also use a founder's memory agent indexed on past call notes to onboard new hires, or have agents generate one-page visual HTML briefs to align human teammates before writing code.

Ultimately, treating sandboxed AI agents as competent, strictly bounded work tools allows organizations to safely multiply human productivity without sacrificing security or accountability.

More from The Room Podcast