Diagram: Debugging workflow
1) Turn on observability first
CLI debug logs
- engine option resolution (
mode,network, limits) - container lifecycle and pool behavior
- execution completion metadata (
exitCode,duration,truncated)
Server debug logs
- request metadata (
runtime, code length,sessionId) - session reuse vs creation
- semaphore acquire/release
- auto-prune activity
2) Reproduce with a minimal command
Before deep analysis, reduce moving parts:- package installs (
--install) - filtered network (
--net filtered,--allow,--deny) - persistence (
--persistent,--persist) - larger input/files
3) Inspect container state with --persist
--persist leaves execution containers running so you can inspect filesystem/process state.
4) Validate effective configuration
Many issues come from unexpected default/override values.defaults.network,defaults.timeoutMs,defaults.memoryLimitnetwork.whitelist/network.blacklistcleanup.autoPrune,cleanup.maxContainerAgeMsmaxConcurrent
5) Debug stream vs non-stream behavior
CLI streams by default. If debugging final output/result flags (truncated, final stderr), switch to non-stream mode:
- final stdout/stderr
- truncation warning when output exceeded cap
- network logs (if present)
6) Debug network policy issues
For filtered mode connectivity checks:- target host actually matches allow regex
- deny rules are not shadowing allow rules
networkLogsappear only when both are true:network: filteredlogNetwork: true
7) Debug session and file issues (remote)
If files/sessions fail, verifysessionId usage and lifecycle:
- create/reuse session via
/executewithsessionId - call
/fileupload/download using samesessionId - check prune settings if session disappears
8) Library-level debugging patterns
9) High-signal checks by failure class
Runtime selection
- explicitly pass
--runtimewhen extension detection is uncertain - avoid inline Deno; run Deno code from file path (
.mts) in current adapter model
Resource pressure
- raise
--timeoutfor long workloads - raise
--memoryfor OOM-like termination - increase
--sandbox-sizefor large package/file workloads
Persistent mode behavior
- one persistent container supports one runtime
- local CLI process exit ends engine lifecycle
- for multi-call remote persistence, use stable
sessionId
Output surprises
- set
--no-streamto inspect final aggregate output path - raise
--max-outputwhen output is intentionally large
Related pages
Execution guide
Execution pipeline details and mode-level semantics.
Remote server and client
Session lifecycle, file endpoints, and auto-pruning behavior.
Security model
Filtered networking, seccomp, and masking boundaries.
Troubleshooting
Symptom-driven fixes and concrete recovery steps.