Skip to content

Add claude-code-demo: sandboxed Claude Code coding agent - #20

Merged
slopp merged 1 commit into
brevdev:mainfrom
tklawa-nvidia:claude-code-demo
May 21, 2026
Merged

Add claude-code-demo: sandboxed Claude Code coding agent#20
slopp merged 1 commit into
brevdev:mainfrom
tklawa-nvidia:claude-code-demo

Conversation

@tklawa-nvidia

Copy link
Copy Markdown

Summary

Adds a new claude-code-demo/ that turns a NemoClaw sandbox into a chat-driven coding workspace. Users can send a prompt through any channel (Telegram, TUI, Discord, etc.) and a sandboxed Claude Code worker builds the project, iterates, and reports back. Builds run in the background so the agent stays responsive and can orchestrate many projects in parallel.

Supports both Anthropic auth modes, and both keep the long-lived secret on the host:

  • SSO (recommended)claude-push-daemon.py refreshes the OAuth access token on the host and pushes only the short-lived token into the sandbox. Rotation is configurable (default every 2 hours). The refresh token never enters the sandbox.
  • API keyclaude-proxy.py runs on 127.0.0.1:9202 and injects the sk-ant-... key per request. The sandbox only ever holds an ANTHROPIC_BASE_URL pointer and a placeholder key.

Optional GitHub integration routes git pushes through github-proxy.py (a token-gated forward proxy) so the PAT also never enters the sandbox.

What's in the folder

  • claude-code-guide.md — user-facing guide (prereqs, quick start, security overview, management commands, how parallel builds work)
  • install.sh / setup.sh — first-time install and re-deploy after a sandbox reset
  • claude-push-daemon.py — host-side OAuth token rotator (SSO mode)
  • claude-proxy.py — host-side Anthropic API proxy (API-key mode)
  • github-proxy.py — host-side GitHub forward proxy
  • claude-runner.sh — in-sandbox wrapper that runs claude with the pushed token / proxy env
  • skills/claude-code/SKILL.md — OpenClaw skill that routes coding requests to the sandbox
  • policy/claude-code.yaml — network policy (egress scoped to the chosen proxy endpoint)

Per instructions, the root README.md table is intentionally not touched in this PR -- happy to add a row for claude-code-demo in a follow-up if you'd like.

Test plan

  • Fresh install via ./install.sh in SSO mode on NemoClaw host; verified ~/.claude/.credentials.json stays on host, sandbox only has short-lived /sandbox/.openclaw-data/claude-code/oauth_token
  • Fresh install in API-key mode; verified sandbox has only ANTHROPIC_BASE_URL=http://<host>:9202 and placeholder key, real sk-ant-... stays in ~/.nemoclaw/credentials.json
  • End-to-end build via OpenClaw chat -> sandboxed claude -> git push through github-proxy.py
  • setup.sh re-deploy after sandbox reset preserves rotation policy and auth mode
  • Token rotation observed at the configured interval without disrupting active builds

Made with Cursor

Turns a NemoClaw sandbox into a chat-driven coding workspace: ask through
any channel (Telegram, TUI, Discord) and a sandboxed Claude Code worker
builds the project, iterates, and reports back. Builds run in the
background so the agent stays responsive and can orchestrate many projects
at once.

Both Anthropic auth modes are supported and both keep the long-lived
secret on the host:
 - SSO (recommended): claude-push-daemon.py refreshes the access token
   on the host and pushes only the short-lived token into the sandbox.
   Rotation is configurable (default every 2 hours).
 - API key: claude-proxy.py on 127.0.0.1:9202 injects the sk-ant-... key
   per request; the sandbox only ever holds an ANTHROPIC_BASE_URL pointer
   and a placeholder key.

Optional GitHub integration routes git pushes through github-proxy.py
(token-gated forward proxy) so the PAT also never enters the sandbox.

Made-with: Cursor
@slopp

slopp commented Apr 17, 2026

Copy link
Copy Markdown

Would be interesting to see what we can upstream into the OpenShell provider work, ideally those token daemons and proxies all become part of OpenShell and the demo here is more about the claud-as-a-sub-agent skills and policies.

Not a blocker for merging, but want to be sure we have those convos with @johntmyers

@slopp
slopp merged commit cf1007a into brevdev:main May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants