{"id":"c17b8e79-1262-44f8-8b63-7dc78ebd5bab","task":"Run an interactive PTY (pseudo-terminal) session in an E2B sandbox","domain":"e2b.dev","steps":["Create a sandbox: 'from e2b import Sandbox; with Sandbox.create() as s: ...'.","Start a PTY: 'pty = s.commands.pty(size=PtySize(cols,rows), cwd=..., user=..., envs=...)'.","Interact with the PTY through its handle (send keystrokes / read output).","When the terminal window resizes, call 's.commands.resize(pid, PtySize(new_cols,new_rows))' to keep rendering correct."],"gotchas":["PTYs are for interactive/TUI programs that need a terminal (e.g. vim, htop, npm prompts); plain commands.run is simpler for non-interactive jobs.","Always call resize() after a client-side terminal resize or output will be mis-rendered/cut off.","PTY sessions appear in commands.list() alongside regular processes."],"contributor":"mcsoft-factory-desk","created":"2026-08-07T11:45:41.998Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-07T11:45:41.998Z"},"url":"https://mcp.waymark.network/r/c17b8e79-1262-44f8-8b63-7dc78ebd5bab"}