Skip to content

Comments

feat: Add Sprites provider and sandboxes claude command#16

Merged
tnm merged 10 commits intomainfrom
feat/sprites-provider
Jan 15, 2026
Merged

feat: Add Sprites provider and sandboxes claude command#16
tnm merged 10 commits intomainfrom
feat/sprites-provider

Conversation

@tnm
Copy link
Contributor

@tnm tnm commented Jan 15, 2026

Summary

  • Add Fly.io Sprites as a new sandbox provider with dual SDK/CLI mode support
  • Add sandboxes claude command for interactive Claude Code sessions in sandboxes
  • Support both Sprites and E2B as providers for Claude Code

Features

Sprites Provider

  • Dual mode: SDK (with SPRITES_TOKEN) or CLI (with sprite login)
  • Checkpoint/restore support for fast state restoration
  • 100GB persistent storage, Python 3.13, Node.js 22 pre-installed

sandboxes claude Command

# Sprites (recommended) - zero config after sprite login
sandboxes claude

# E2B alternative
sandboxes claude -p e2b

# Persistent named sandbox (Sprites only)
sandboxes claude -n myproject

# List existing sandboxes
sandboxes claude --list

Test plan

  • All 210 tests passing
  • Manual testing of sandboxes claude with Sprites
  • Manual testing of sandboxes claude -p e2b with E2B

tnm added 10 commits January 14, 2026 23:14
Add Fly.io Sprites as a sandbox provider:
- Dual-mode: SDK (SPRITES_TOKEN) or CLI (sprite login)
- Claude Code, Python 3.13, Node.js 22 pre-installed
- Checkpoint/restore support for instant starts
- 100GB persistent storage, ~$0.46/4hr session

Add 'sandboxes claude' command for interactive Claude Code:

    sandboxes claude                    # Start Claude Code in sandbox
    sandboxes claude -n myproject --keep  # Persistent environment

Also adds 'sandboxes shell' for raw shell access.

Security: env var key validation and shell value escaping
- Add -p/--provider flag to choose between sprites and e2b
- E2B uses anthropic-claude-code template with Claude Code pre-installed
- Full PTY bridge: stdin/stdout passthrough, terminal resize handling
- Update README with E2B setup instructions
- Use Sandbox.create() instead of deprecated constructor
- Write to /home/user/.bashrc to auto-run claude on connect
- Update README to clarify E2B requires both SDK and CLI
- Note persistent environments are Sprites only
- Replace print() with logging in sandbox.py auto-configure
- Add exception logging instead of silent pass blocks
- Fix shell injection in Daytona/Modal providers (env var escaping)
- Fix CLI mode issues in Sprites provider (get_sandbox, checkpoints)
- Fix set.remove() -> discard() in pool.py (prevent KeyError)
- Fix semaphore._value private API access in retry.py
- Fix imprecise sandbox name matching in CLI
- Fix E2B .bashrc overwrite (use wrapper script)
- Add --keep default for resumed named sandboxes
@tnm tnm merged commit fde6558 into main Jan 15, 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.

1 participant