Add claude-code-demo: sandboxed Claude Code coding agent - #20
Merged
Conversation
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
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
claude-push-daemon.pyrefreshes 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.claude-proxy.pyruns on127.0.0.1:9202and injects thesk-ant-...key per request. The sandbox only ever holds anANTHROPIC_BASE_URLpointer 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 resetclaude-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 proxyclaude-runner.sh— in-sandbox wrapper that runsclaudewith the pushed token / proxy envskills/claude-code/SKILL.md— OpenClaw skill that routes coding requests to the sandboxpolicy/claude-code.yaml— network policy (egress scoped to the chosen proxy endpoint)Per instructions, the root
README.mdtable is intentionally not touched in this PR -- happy to add a row forclaude-code-demoin a follow-up if you'd like.Test plan
./install.shin SSO mode on NemoClaw host; verified~/.claude/.credentials.jsonstays on host, sandbox only has short-lived/sandbox/.openclaw-data/claude-code/oauth_tokenANTHROPIC_BASE_URL=http://<host>:9202and placeholder key, realsk-ant-...stays in~/.nemoclaw/credentials.jsonclaude-> git push throughgithub-proxy.pysetup.shre-deploy after sandbox reset preserves rotation policy and auth modeMade with Cursor