claude-code template supports ANTHROPIC_API_KEY.
Run Claude Code
Create a sandbox from theclaude-code template, run Claude Code headlessly,
and clean up. The SDK and CLI paths are equivalent — use the one that matches
your workflow.
Interactive terminal
Open a PTY instead of a headless run to drive Claude Code interactively:session_id from sandbox pty create with --session-id.
Work on a cloned repository
Structured and streaming output
Resume a session
Claude Code persists conversations in its own CLI state inside the sandbox. Use the CLI’s session ID with--resume when you want follow-up work in the same
sandbox session.
Nullspace run IDs are not conversation session IDs. Framework session, thread,
checkpoint, or flow state stays app-owned. For Claude Code, store session files
in a volume or app-managed storage when they must survive sandbox cleanup. Use
volumes, retained sandboxes, hibernate/auto-resume, or an external database for
state that must outlive one disposable sandbox.