NVIDIA / NVIDIA/NemoClaw

[DGX Spark][Agent&Skills] an empty agent .env file makes every Deep Agents run fail with an opaque RemoteError; removing the file restores it

Open
#11,968 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
22.5k
Forks
3.1k
Avg merge
1d 1h
Merged PRs (30d)
715

Description

## Description

A zero-byte `.env` file in the Deep Agents Code config directory makes every agent run fail. The failure is reported as a remote model error, which points the operator at the inference provider rather than at the empty file that actually causes it:

```text
managed non-interactive error: error_class=RemoteError category=agent_remote_failure
retryable=false correlation_id={id}
Model request failed: RemoteError (category=agent_remote_failure retryable=false)
```

Deleting the empty file — changing nothing else — makes the same command succeed immediately. The behaviour toggles reliably with the file's presence:

| `.env` state | result |
|---|---|
| present and empty (0 bytes) | agent exits 1, `RemoteError`, no reply |
| absent | agent exits 0, returns the requested reply |

An empty file is an ordinary end state: it is what the operator is left with after following the product's own advice to remove an offending line from `.env` when that line was the only one in the file. The product refuses to start when `.env` holds a secret-shaped value and tells the operator to remove it; doing exactly that can leave a zero-byte file, and the agent is then broken with an error that names neither the file nor the cause.

The diagnosis is also actively misleading. `agent_remote_failure` with `retryable=false` describes a provider-side rejection, so the operator has no reason to suspect a local empty file. A second sandbox on the same host, same build, same provider and same model answered the identical request successfully throughout, which rules out the provider and the model.

- **Platform scope:** Reproduced on DGX Spark (Ubuntu 24.04 aarch64) only; other platforms not tested this pass.
- **Regression:** Unknown — earlier builds not tested this pass.
- **OpenShell issue:** No — the sandbox stays Ready and reachable; the failure is in the agent startup path inside the sandbox.

## Environment

```text
Device: NVIDIA DGX Spark
OS: Ubuntu 24.04.4 LTS
Architecture: aarch64
Docker: Docker version 29.2.1
OpenShell CLI: openshell 0.0.116
NemoClaw: nemoclaw v0.0.126
Agent: LangChain Deep Agents Code v0.1.55
Provider: NVIDIA cloud inference
```

## Steps to Reproduce

1. Onboard a Deep Agents Code sandbox and confirm it is Ready.
2. Confirm the agent works before any change, recording the exit code and that the reply contains the token:

```bash
nemoclaw {sandbox} exec -- dcode -n "Reply with the single word PING."
```

3. Create an empty `.env` in the agent config directory and confirm it is zero bytes without printing its contents:

```bash
nemoclaw {sandbox} exec -- bash -c ': > /sandbox/.deepagents/.env'
nemoclaw {sandbox} exec -- bash -c 'wc -c < /sandbox/.deepagents/.env'
```

4. Repeat the request from step 2 and record the exit code and error.
5. Remove the file and repeat the request once more:

```bash
nemoclaw {sandbox} exec -- bash -c 'rm -f /sandbox/.deepagents/.env'
```

6. As a control, run the same request on a second Deep Agents sandbox on the same host that was never touched.

## Expected Result

An empty `.env` is treated the same as no `.env`: the agent starts and answers normally.

If an empty file genuinely cannot be accepted, the error should name the file and say what is wrong with it, rather than reporting a non-retryable remote model failure.

## Actual Result

```text
step 2 agent before any change exit 0, reply contains the token
step 3 .env created, size 0 bytes
step 4 agent with empty .env exit 1, RemoteError agent_remote_failure
step 5 .env removed, agent exit 0, reply contains the token
step 6 control sandbox, untouched exit 0, reply contains the token
```

The empty-file state was recreated and removed a second time with the same outcome each way, so the behaviour is deterministic rather than a transient provider failure. Nothing in the output mentions `.env`, the config directory, or any local file.

## Logs

```text
before change exit 0 token present
empty .env, attempt 1 exit 1 RemoteError agent_remote_failure
empty .env, attempt 2 exit 1 RemoteError agent_remote_failure
empty .env, attempt 3 exit 1 RemoteError agent_remote_failure
file removed exit 0 token present
empty .env recreated exit 1 RemoteError agent_remote_failure
file removed again exit 0 token present
control sandbox exit 0 token present
```

## Related issues / not duplicate of

No existing report covers an empty agent environment file breaking agent startup.

Distinct from the secret-shaped-value guard, which works correctly: when `.env` contains a secret-shaped value the product refuses to start and prints a clear message naming the file and the key. That guard is not involved here — the file is empty, and the failure surfaces as a remote model error instead of any local diagnostic.

Contributor guide

Open the contributing guide

Research direction

Start at the dcode startup and configuration-loading path for /sandbox/.deepagents/.env, then reproduce the empty-file and absent-file states with the listed nemoclaw commands. Done means both states start successfully and return PING, or an unsupported empty file produces a clear local diagnostic instead of agent_remote_failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, docker, typescript
Domain
ai, backend, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.