[Deep Code] Interactive chat fails in Wasmtime when memfd_create is blocked
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
## Severity
P1
## Environment
- NemoClaw v0.0.124
- OpenShell 0.0.116
- Deep Code 0.1.55
- Supported OpenRouter configuration
- Linux OpenShell sandbox with the shipped restrictions unchanged
## Description
A successfully onboarded Deep Code sandbox cannot complete its first interactive TUI model turn. The failure occurs before inference in the langchain_quickjs to quickjs_rs to Wasmtime path and ends with WasmtimeError: cannot create a memfd.
A separate minimal os.memfd_create call inside the same sandbox returns EPERM. Headless Deep Code chat and file-tool turns succeed, and stop/start preserves headless inference with the correct provider configuration. This isolates a compatibility defect between the supported interactive runtime and the shipped sandbox restrictions rather than an inference credential or provider failure.
The issue was first observed on a Brev Launchable, but it reproduces through the catalog command over the shipped WebSocket without relying on the browser terminal. No evidence currently makes it Brev-specific.
## Reproducer
1. Onboard a Deep Code sandbox using the supported image and default OpenShell restrictions.
2. Confirm a headless Deep Code prompt succeeds.
3. Start the advertised interactive command:
openshell sandbox exec --tty --name -- dcode
4. Submit a simple first model prompt in the TUI.
5. Independently confirm that a minimal os.memfd_create call inside the sandbox returns EPERM.
## Observed behavior
The prompt submits, then interactive execution fails before inference with a Wasmtime error ending in cannot create a memfd. Headless chat and tools remain functional.
## Expected behavior
The advertised Deep Code interactive TUI works inside the supported OpenShell sandbox without disabling the sandbox security boundary.
## Acceptance criteria
- [ ] Reproduce the first interactive turn with the shipped Deep Code and OpenShell versions.
- [ ] Identify the exact component and syscall flags that require memfd creation.
- [ ] Provide a supported runtime fallback or a narrowly reviewed sandbox compatibility change; do not broadly weaken sandbox restrictions.
- [ ] A real interactive TUI prompt completes successfully under the supported restrictions.
- [ ] Headless chat, file tools, and stop/start behavior remain successful.
- [ ] Regression coverage exercises the real QuickJS/Wasmtime initialization path under blocked memfd behavior.
- [ ] Failure diagnostics identify the incompatible runtime boundary without exposing credentials or deployment identifiers.
## Related issue
#8018 addressed a different consumer of the same blocked primitive: NemoClaw managed-MCP snapshot creation. It is not a duplicate because the current failure is in the interactive QuickJS/Wasmtime dependency path and occurs without that managed-MCP snapshot flow.
Contributor guide
Assessment
This issue has not been assessed yet.