Conversation
Contributor
motatoes
commented
Mar 9, 2026
- Replace /commands with session-based exec API
- fix: VM network connectivity + exec SDK improvements
- add claude agent sdk
Replace the fire-and-forget POST /commands endpoint with persistent, reconnectable exec sessions. Sessions keep running independently of client connections and support scrollback replay on reconnect. Key changes: - New gRPC RPCs: ExecSessionCreate, ExecSessionAttach (bidi stream), ExecSessionList, ExecSessionKill in both agent and worker protos - ScrollbackBuffer: 1MB ring buffer with fan-out to subscribers - Agent-side session manager with process group kill, env layering, disconnect timers, and 5-min exited session retention - Host-side ExecSessionManager mirroring PTYManager pattern - HTTP/WebSocket handlers with binary protocol (stream ID byte prefix) - WebSocket auth: support token as query param for WS connections - TypeScript SDK: Exec class with start/attach/run/list/kill - Python SDK: Exec class with run/start/list/kill via WebSocket - CLI: session-based exec with list/attach/kill subcommands - Deploy fixes: use vmlinux-docker-5.10 kernel (vsock support), load vhost_vsock module, advertise public IP, open port 8081 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add iptables FORWARD rules for 172.16.0.0/16 (Docker sets FORWARD policy to DROP, blocking VM outbound traffic) - Add ExecSession.done promise for awaiting process exit - Add WebSocket onclose/onerror handlers to prevent run() hanging - Default run() timeout to 60s (matching Python SDK) - Fix agent pipe drain race: WaitGroup ensures stdout/stderr readers finish before signaling exit - Strip hardcoded IPs from example scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
breardon2011
approved these changes
Mar 9, 2026
| return c.JSON(http.StatusServiceUnavailable, errSandboxNotAvailable) | ||
| } | ||
|
|
||
| sessionID := c.Param("sid") |
Contributor
There was a problem hiding this comment.
We never check if the session belongs to the sandbox.
Similarly in internal/worker/handlers.go (different binary)
Session endpoints looked up sessions by ID only without checking ownership, allowing cross-sandbox session access if session IDs were known. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Preview Environment DestroyedThe preview environment |
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.