Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Versioning and Keep a Changelog conventions.

### Changed

- Preserve Windows system and profile environment variables when launching providers,
without inheriting unrelated credentials. Hide provider and cleanup console windows.
Add native process fixtures for arguments, stdin, failures, cancellation, and
Windows Claude/Codex/OpenCode `.cmd` wrappers.

- Corrected the minimum supported Rust version to 1.88 to match locked
dependencies, with an all-targets/all-features compiler check in CI.
- Crate archive paths are root-anchored so nested third-party README/license
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ Keep pull requests focused and describe:

By contributing, you agree that your contributions are licensed under the
project's MIT OR Apache-2.0 terms.

## Platform compatibility

See [Linux and Windows runtime testing](docs/how-to/test-platform-compatibility.md)
for native launch fixtures and the separate authenticated-provider acceptance checks.
8 changes: 8 additions & 0 deletions docs/how-to/manage-background-processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,11 @@ For agent-launched descendants, see
[Keep tool processes running](keep-tool-processes-running.md). For durable
projection rules, see
[Persist command and tool execution](persist-command-execution.md).

### Provider server shutdown

For attached providers such as `opencode serve`, the runtime stops the server
after a terminal protocol event. A signal or nonzero exit caused by that
intentional shutdown does not turn a completed turn into a failure. Provider
errors and an unexpected stream closure still fail the turn; cancellation
continues to abort the session before terminating its process.
59 changes: 59 additions & 0 deletions docs/how-to/test-platform-compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Test Linux and Windows runtime compatibility

Run native process tests on the execution host, not only on the desktop client.
The runtime launches the provider CLI on that host. A Windows Fleet client
connected to a Linux execution target does not exercise native Windows agents.

## Credential-free launch tests

Install stable Rust and run:

```sh
cargo test --locked --lib process::tests -- --nocapture
cargo test --locked --all-features
```

The process tests compile a small native executable in a directory containing
spaces. They verify JSON and Unicode arguments, stdin, explicit environment
values, nonzero exit status, and cancellation. Windows additionally launches
`claude.cmd`, `codex.cmd`, and `opencode.cmd` fixture wrappers. These are launcher
fixtures, not actual authenticated provider turns. No provider installation or
model credentials are needed. The existing CI matrix runs these tests on Linux,
macOS, and Windows.

The SDK preserves an explicit environment allowlist. On Windows this includes
system paths and profile/configuration directories, using case-insensitive key
matching. Unrelated API keys are not inherited. Explicit command environment
values still override inherited values. Windows child launches and taskkill
cleanup suppress console windows. Rust owns native command argument escaping;
callers must supply separate program and argument values.

## Real provider acceptance

Before claiming full platform support, run each installed provider through the
SDK on Linux and Windows with the user's own login. Verify tool start/completion,
approvals, cancellation with descendant processes, session resume, missing or
expired authentication, and long-running development servers. Exercise both
native executable and npm shim installations on Windows. Run equivalent tests
through Fleet after its adapter correctly maps the SDK's launch capabilities.
A successful cross-compilation or fixture run does not certify these journeys.

## Current limits

- SSH password authentication from a Windows execution host is explicitly
unsupported; the askpass helper currently requires Unix.
- Process-tree cleanup uses Unix process groups or Windows `taskkill /T /F`.
This is lifecycle management, not a security sandbox.
- Sandbox backend support must be checked independently; never bypass a requested
sandbox to make a platform test pass.
- Windows OS-service installation is an application responsibility, outside
this library's provider launch contract.

Real CLI checks now also cover extensionless npm command names on Windows,
resolved against the child PATH before spawning. OpenCode serve readiness uses
`/global/health` and requires a healthy JSON response; `/app` is a web UI route
in current versions and is not an API readiness check. Each probe is bounded.

Fleet launch-context checks include additional developer instructions on new
and resumed Codex app-server threads; this preserves Fleet model identity
instructions without rejecting the first turn before it reaches the provider.
Loading
Loading