Repository navigation
feat(sandbox): move to env's redesigned guest services - #3148
Draft
thomasbarrett wants to merge 4 commits into
Draft
thomasbarrett wants to merge 4 commits into
thomasbarrett wants to merge 4 commits into
Conversation
Bump agent-substrate/env to 0d359ea, which redesigns the guest ProcessService and FileSystemService (agent-substrate/env#65), and adapt the passthrough gRPC API, Go client, CLI, MCP tools, tests and docs. - StreamProcessOutput ends with an exit message once the process has exited and all output is delivered. The CLI's wait reads it instead of polling GetProcess, and read_sandbox_outputs reports exited and exit_code. - SignalProcess replaces KillProcess. kill_sandbox_process sends SIGKILL; the CLI's kill takes --signal. - WriteProcessInput is forwarded with update access, so processes started with stdin can be fed. - Process state is RUNNING or EXITED with a shell-convention exit code, replacing the COMPLETED, FAILED and TERMINATED statuses. BREAKING CHANGE: the ateenv messages are wire-incompatible with the old guest, so sandboxes running a guest image from before this change stop working with a controller after it. get_sandbox_process returns state instead of status, and the CLI's JSON finished records carry state. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
thomasbarrett
marked this pull request as draft
October 10, 2026 19:09
kill_sandbox_process returned the state right after the signal, usually RUNNING with exit code 0, which reads as a clean exit. It now waits briefly for the exit message, as it returned the exit code before the env upgrade. kagent sandbox kill --signal accepts numbers and SIGNAL_ names. The docs note that an env upgrade that changes the guest messages requires deleting existing sandboxes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The old guest's kill waited for the process to die and returned its exit code, and killing a process that had already exited returned that exit. The new SignalProcess returns at once and refuses exited processes. The CLI's kill now waits for a SIGKILL exit like the MCP tool, and both report how an already-exited process exited instead of failing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drop what the upgrade does not need: stdin forwarding, kill --signal, waiting for a kill's exit, and exited/exit_code on read_sandbox_outputs. Kill now sends SIGKILL and reports the state right after delivery; the exit code comes from get_sandbox_process or sandbox wait. sandbox wait keeps its GetProcess loop and ignores the stream's exit message. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Moves
agent-substrate/envto0d359ea, which includes agent-substrate/env#65, and adapts kagent to its renamed guest API. No new features: stdin input stays unforwarded and is refused, like any RPC without an access policy.Breaking:
get_sandbox_processreturnsstate(PROCESS_STATE_RUNNINGorPROCESS_STATE_EXITED) instead ofstatus.kill_sandbox_processandkagent sandbox killsend SIGKILL and report the state right after delivery, not the exit code. Useget_sandbox_processorkagent sandbox waitfor the exit.stateinstead ofstatus, and JSON output records usesource: "stdout"or"stderr".SignalProcessreplacesKillProcess, andStreamProcessOutputreplacesStreamProcessOutputs.🤖 Generated with Claude Code