NVIDIA / NVIDIA/NemoClaw

[Ubuntu 24.04][Agent&Skills] /compact runs for minutes without completing and increases context tokens instead of decreasing

Open
#4,781 0 comments 0 reactions 1 assignee Claimed by @apurvvkumaria View on GitHub
area: performance area: sandbox needs: unblock NV QA platform: ubuntu
Dominant language
TypeScript
Stars
22.5k
Forks
3.1k
Avg merge
1d 1h
Merged PRs (30d)
715

Description

## Description

Inside a NemoClaw OpenShell sandbox on Ubuntu 24.04, running `/compact` on a chat session created via `openclaw chat send` leaves the chat UI in a long-running "noodling… / hobnobbing…" state for several minutes, with the context token count **increasing** rather than decreasing. In a parallel terminal `openclaw status` reports the gateway and agent as healthy. This behavior does not match the expectation that manual compaction should complete promptly and reduce context tokens.

## Environment

```text
Device: Ubuntu 24.04 server
OS: Ubuntu 24.04
Architecture: x86_64
Node.js: v22.22.3
npm: 10.9.8
Docker: Docker version 29.2.1, build a5c7197
OpenShell CLI: openshell 0.0.44
NemoClaw: nemoclaw v0.0.58
OpenClaw: OpenClaw 2026.5.22 (a374c3a)
```

## Steps to Reproduce

**Preconditions**

- Platform: Ubuntu 22.04/24.04 or macOS (repro on Ubuntu 24.04).
- One OpenShell sandbox running with inference configured and gateway healthy.

**Steps**

1. Inside the sandbox, verify models are configured:
```bash
openclaw models list
```
Confirm at least one model is listed with a provider (e.g. `nvidia/nemotron-3-super-120b-a12b` via NemoClaw/Managed Inference).
2. Start a new session via chat:
```bash
openclaw chat send "hello" --session s05-new-session
```
Verify: exit code is 0, and the response is non-empty (agent replies "hello" or similar).
3. List sessions:
```bash
openclaw sessions list
```
Confirm that `s05-new-session` appears (key typically like `agent:main:explicit:s05-new-session`).
4. Send multiple messages to `s05-new-session` (or session `main` via TUI/dashboard) to build up some context (e.g. a handful of back-and-forth messages) until the chat UI shows a token count around 6–7k/131k (~5%).
5. In the chat UI (OpenClaw TUI / dashboard) for agent `main` | session `main`, run:
```text
/compact
```
6. Observe the live status line below the prompt. After several minutes, it shows:
```text
⠸ noodling… - 3m 4s | connected agent main | session main | inference/nvidia/nemotron-3-super-120b-a12b | tokens 6.7k/131k (5%)
⠙ hobnobbing… - 7m 3s | connected agent main | session main | inference/nvidia/nemotron-3-super-120b-a12b | tokens 15k/131k (12%)
```
There is no "Compaction complete" or equivalent confirmation message, even after >7 minutes.
7. While `/compact` is still "noodling/hobnobbing," in a second terminal inside the sandbox run:
```bash
openclaw status
```

## Expected Result

1. `openclaw models list` returns at least one available model with a provider.
2. `openclaw chat send "hello" --session s05-new-session` succeeds with exit code 0 and a non-empty response.
3. `openclaw sessions list` includes `s05-new-session` (e.g. `agent:main:explicit:s05-new-session`).
4. After `/compact`:
- The compaction turn completes within a reasonable time (e.g. under 1–2 minutes for ~6–15k tokens).
- The UI returns from "noodling… / hobnobbing…" to idle and emits a confirmation message (for example, "Compaction complete").
- The context token count in the status line **decreases** compared to the pre-compaction value, reflecting a more compact session representation.
- `openclaw status` shows the gateway and agent as healthy, with no new errors.

## Actual Result

Steps 1–3 behave as expected:

- `openclaw models list` is non-empty.
- `openclaw chat send "hello" --session s05-new-session` returns exit code 0 and a non-empty response.
- `openclaw sessions list` shows the new session.

After `/compact`, the chat UI remains stuck in a long-running compaction turn:

```text
/compact
⠸ noodling… - 3m 4s | connected agent main | session main | inference/nvidia/nemotron-3-super-120b-a12b | tokens 6.7k/131k (5%)
⠙ hobnobbing… - 7m 3s | connected agent main | session main | inference/nvidia/nemotron-3-super-120b-a12b | tokens 15k/131k (12%)
```

- No completion or success message is returned to the user, even after >7 minutes.
- The context token count **increases** from about 6.7k to 15k instead of decreasing, contradicting the expectation that compaction reduces context size.

In a parallel terminal, `openclaw status` shows the gateway and agent as healthy:

```text
Gateway │ local · ws://127.0.0.1:18791 (env OPENCLAW_GATEWAY_URL) · reachable 55ms · auth token · 8ecd692fb888 (8ecd692fb888)
Agents │ 1 · no bootstrap files · sessions 5 · default main active just now
Sessions │ 5 active · default nvidia/nemotron-3-super-120b-a12b (131k ctx) · ~/.openclaw/agents/main/sessions/sessions.json
Tasks │ 0 active · 0 queued · 0 running · 1 issue · audit clean · 5 tracked
```

No compaction or gateway errors are reported.

From the user/test-case perspective:

- The gateway remains healthy (step 7 partially satisfied),
- But `/compact` does not visibly complete in a reasonable time, and the context token count increases instead of decreasing (step 6–7 expectation not met).

## Logs

Chat UI excerpt:

```text
/compact
⠸ noodling… - 3m 4s | connected agent main | session main | inference/nvidia/nemotron-3-super-120b-a12b | tokens 6.7k/131k (5%)
⠙ hobnobbing… - 7m 3s | connected agent main | session main | inference/nvidia/nemotron-3-super-120b-a12b | tokens 15k/131k (12%)
```

`openclaw status` excerpt shown above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.