Skip to main content
This page covers the environment-specific parts of writing a custom module. For the shared mechanics (file layout, registration, lifecycle) see Writing a custom module. For the full interface reference see EnvironmentModule.

Minimal Skeleton

envConfig

The host passes per-execution configuration via input.envConfig (a Record<string, unknown>). The keys are caller-provided; each environment module documents which keys it recognises and falls back to sensible defaults for any missing values:
Formerly this configuration lived in a separate ExecutionOptions type and an options field on ExecutionInput. Both have been removed in favour of envConfig. Update any existing module code accordingly.

Full Example

See the Shell environment example in the repository for a complete, working environment that executes submitted code as shell commands via sh -c. It streams stdout and stderr back through the host bindings and reports the exit code on completion. See EnvironmentBindings for the callback surface and Execution for the state machine and timeout contracts.
Last modified on July 4, 2026