Skip to content

Add the process protocol, Linux process service and client - #337

Merged
SaladDay merged 1 commit into
feature/agent-outside-sandboxfrom
aos/process-protocol
Oct 1, 2026
Merged

SaladDay merged 1 commit into
feature/agent-outside-sandboxfrom
aos/process-protocol

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the Runtime–process service protocol: the agent host uses it to start and control processes inside a sandbox.

  • internal/sandboxprocess/protocol.go defines the protocol: 12 operations, events starting at 0x4001, ProcessSpec/PTYSpec, capabilities, typed failures and strict codecs on internal/sandboxwire. The same package has the generic client and server.
  • apps/sandboxio/internal/processservice is the Linux service:
    • explicit launches through a umask trampoline (a private Init() hook);
    • pipes or a PTY (creack/pty);
    • POSIX session scopes, with signal targets, and Cancel escalating TERM→KILL. A signal reaches only processes the service can prove are in the operation's session, tracked by pidfd custody; when it can't prove that, it sends nothing;
    • one SIGCHLD reap loop, processservice.Reap(ctx), owns every child exit, so the service can run as a child subreaper. It needs pidfd support (Linux 5.3 or later), checked at startup;
    • workloads inherit no descriptors other than stdio;
    • replay with acknowledgement and backpressure;
    • operation-ID deduplication with tombstones;
    • owner-loss grace;
    • incarnation checks.
  • docs/process-protocol.md documents it, and it has an AGENTS.md boundary row and a repository-map row.

ScopeCgroupV2 is not advertised. RequestIDs strictly increase on a stream, enforced by sandboxwire.RequestSequence.

Checks:

  • go test -race -count=3 ./internal/sandboxprocess ./apps/sandboxio/...
  • FuzzDecode, 30 s
  • go vet, gofmt
  • darwin and windows builds of internal/sandboxprocess

Part of the agent-outside-sandbox work, milestone M1, lane L2.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@blacksmith-sh

blacksmith-sh Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
github.com/MiniMax-AI/OpenAgentCore/services/core/internal/persistence/postgres/
deploymentpg/TestResetStartEscalateAndComplete
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay force-pushed the aos/process-protocol branch from b4ae990 to 823fea1 Compare October 1, 2026 00:19
@SaladDay
SaladDay merged commit 87ffeab into feature/agent-outside-sandbox Oct 1, 2026
1 check passed
@SaladDay
SaladDay deleted the aos/process-protocol branch October 1, 2026 00:19
internal/sandboxprocess defines the Runtime–process service protocol on
sandboxwire framing, with golden fixtures, a decoder fuzz target and a
generic client and server. apps/sandboxio/internal/processservice
implements it on Linux: explicit launches through a umask trampoline,
pipes or a PTY, POSIX session scopes, signal targets, cancel escalation,
replay with acknowledgement, deduplication with tombstones and owner-loss
cleanup.
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