#6459 [Engine] Codex CLI auto-compaction fails on /v1/responses: `compaction_trigger` input items are rejected (400)

open · @ThatsR4d · 0 comentários · No GitHub

BenchmarksServer & APINVIDIA / CUDAModels & quantsLinux

Descrição

### Area

[Engine]  (speed, kernels, models, the server and API)

### Desktop app, Terminal or source?

Terminal (the `strata` command)

### What happened

Codex CLI 0.171.0 cannot auto-compact a long session against Strata. When the conversation reaches `model_auto_compact_token_limit`, Codex sends a Responses request whose input contains an item of type `compaction_trigger` (its "remote compaction"). Strata answers 400 `input items of type 'compaction_trigger' are not supported`, the turn fails and `codex exec` exits non-zero. We hit it at ~200K tokens on Terminal-Bench 2.1 `make-mips-interpreter` (a ~1 h agent run lost at the compaction point).

Workaround that works: declare the provider without remote compaction, so Codex compacts locally with ordinary requests:

```toml
[model_providers.strata]
name = "Strata (local)"
base_url = "http://127.0.0.1:8080/v1"
wire_api = "responses"
env_key = "STRATA_KEY"
stream_idle_timeout_ms = 600000

[model_providers.strata.capabilities]
remote_compaction = "unsupported"
```

Verified: a forced compaction at a 15K limit completes and the task answer stays correct; the full `make-mips-interpreter` rerun with this setting compacted locally and passed (3/3 tests, 64.5 min).

Suggestion: add `capabilities.remote_compaction = "unsupported"` to the Codex config that `strata connect codex` writes (its template omits it), or accept/ignore `compaction_trigger` items on `/v1/responses`.

### Smallest steps or command that reproduce it

1. `strata connect codex` (or the provider block above without the `capabilities` table).
2. Profile with `model_auto_compact_token_limit = 15000`, then run a `codex exec` task that reads a few large files.
3. At the limit the request carrying the `compaction_trigger` item gets HTTP 400 and the run ends.

### Reproduction status

Reproduced locally

### Strata version

Strata 0.2.16 / engine 0.1.62 (also 0.2.17 / 0.1.63: same Responses item handling)

### Graphics card, memory and system

RTX 4090 24 GB, i9-14900K, 128 GB DDR5, Ubuntu 26.04 (Linux 7.0), driver 615

### Model, size and settings

Qwen3.8-Flash-Next IQ3_S (GSQ-RCO), 262K context, DFlash2; Codex CLI 0.171.0 (standalone binary), effort medium, `model_context_window = 262144`, `model_auto_compact_token_limit = 200000`

No site

Links install, modelos, releases.