anthropics / anthropics/sandbox-runtime

Feature Request: TTY passthrough for interactive terminal applications

Aperta
#76 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
5.2k
Fork
439
Merge medio
2g 9m
PR unite (30g)
13

Descrizione

## Summary

Add TTY passthrough support to enable running interactive terminal applications (like Claude Code) inside the sandbox.

## Problem

When running Claude Code inside srt, the sandbox blocks TTY operations causing this error:

```
Error: setRawMode EPERM
at ReadStream.setRawMode (node:tty:81:24)
```

Claude Code requires `setRawMode` for its interactive TUI (terminal user interface). The macOS `sandbox-exec` blocks these ioctl operations.

## Current Behavior

- Simple commands work: `srt echo "hello"` ✓
- Interactive TUI apps fail: `srt claude` ✗

## Requested Behavior

Add an option to allow TTY passthrough, e.g.:

```bash
srt --tty claude
```

Or via config:

```json
{
"process": {
"allowTTY": true
}
}
```

## Use Case

Running Claude Code in a sandboxed environment where:
- Filesystem writes are restricted to the current project directory
- Network access is allowed
- But full interactive terminal UI is needed

## Environment

- macOS (sandbox-exec)
- srt version: 0.0.23
- Claude Code version: 2.0.59

## Workaround

Currently using `--print` mode for non-interactive use, but this loses the full TUI experience.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.