Skip to content

Host Process Isolation ​

The Host Process Environment backend executes commands on the current machine and publishes the process and workspace bindings consumed by Agent tools.

csharp
using HPD.Agent;
using HPD.Agent.Sandbox;
using HPD.Environment.HostProcess;
using HPD.Agent.ToolHarness.Coding;

var coder = new AgentConfig()
    .WithToolHarness<CodingToolHarness>();

await using var runtime = await new AgentRuntimeBuilder()
    .WithPermissions()
    .WithSandbox(new HostProcessProviderModule(), HostProcessSandbox.ForDirectory(workspacePath))
    .AddAgent("coder", coder)
    .BuildAsync();

The Environment provider supplies operating-system isolation. The shared Agent sandbox publishes the process and workspace bindings for the selected session.

Low-level Environment hosts may use IProcessProvider or IEnvironmentRuntime directly when they already own an authorized execution target. Agent-facing tools use the published binding instead.

Isolation ​

Host Process supports two related but separate concerns:

  1. Process placement through the Host Process Environment provider.
  2. Operating-system process isolation described by ProcessIsolationPolicy.

Placement can succeed while a requested isolation capability is unavailable. That case follows the provider's capability and degradation policy. Do not infer enforcement merely because a process ran through Host Process.

Platform Boundaries ​

PlatformEffective implementation
macOSSeatbelt profiles through sandbox-exec when dependency checks pass.
LinuxBubblewrap, namespaces, seccomp, and provider-mediated networking when dependencies pass.
WindowsNo accepted OS-confined Host Process backend; explicit degraded admission is required.

Use function permissions, narrow workspace roots, and the shared sandbox capability flow in addition to the Environment isolation policy. Function autoapproval does not authorize a boundary crossing; current Coding filesystem and command escalations use PermissionRequestEvent with PermissionDomains.SandboxCapability.

Built for production .NET agent applications.