Client or integration
Other: Aside desktop, daemon 1.26.921.1617, macOS arm64.
Provider or upstream service
Z.AI GLM-5.3-Flash through a nested OpenCodex combo, using the openai-chat adapter and the Z.AI coding endpoint.
OpenCodex version
2.59.0 (observed before the local mitigation).
Endpoint or capability
/v1/chat/completions; translated combo routing; client-side context compaction; reasoning/output token budget.
Current behaviour
Aside reports: Context overflow recovery failed: Compaction failed: summary hit the token limit; the original transcript was preserved.
This appears to originate in the client's emergency-compaction budgeting, not an HTTP server failure. In the installed Aside code, low output headroom can reduce compaction reserveTokens to 1024. Ordinary summaries then request floor(0.8reserve)=819 output tokens; split-turn prefix summaries request floor(0.5reserve)=512. The parent's thinking level is inherited. A length-terminated summary is rejected, correctly preserving the original transcript.
A synthetic request through the actual nested combo returned HTTP 200, finish_reason=length, completion_tokens=512 including reasoning_tokens=411; the requested Next Steps section was missing. Setting low reasoning only at ingress can be ineffective when nested combo defaultEffort overrides it later.
Expected behaviour
Client compaction needs enough generation budget for a complete structured checkpoint, independently from space reserved for inserting that checkpoint into the next turn. The client must still validate the final context size and reject truncated summaries. A dedicated summary effort should survive combo routing when explicitly selected.
This report requests compatibility triage and guidance on the appropriate client/proxy boundary, not a global override of callers' max_tokens.
Minimal redacted request or reproduction
- In Aside, use a nested OpenCodex combo ending in GLM-5.3-Flash with high/max default effort. Use a synthetic conversation long enough to trigger emergency compaction.
- Observe the standalone two-message summary request: a context-summarization system prompt and a user message containing
<conversation>...synthetic transcript...</conversation> plus structured checkpoint instructions; no tools. The affected output cap is 512 or 819.
- The budget interaction can also be reproduced directly with a synthetic transcript requesting Goal, Constraints, Progress and Next Steps, max_tokens=512, reasoning_effort=max. Exact output varies between provider calls.
- For a bounded comparison, keep that input unchanged but use max_tokens=8192 and reasoning_effort=low at the final physical GLM request, after nested combo overrides.
No private transcript, credentials, account identifiers, session IDs or machine paths are attached.
Actual response or error
Synthetic before: HTTP 200; finish_reason=length; 4789 prompt tokens; 512 completion tokens; 411 reasoning tokens; incomplete checkpoint.
Synthetic after the bounded final-adapter mitigation: finish_reason=stop; 318 completion tokens; 0 reasoning tokens; required synthetic identifiers and Next Steps retained.
Long streaming comparison: 29219 prompt tokens; original requested cap819; after mitigation finish_reason=stop, 351 completion tokens, required identifiers and Next Steps retained.
Upstream documentation
No public Aside specification for this internal emergency budget contract was found. The concrete client requirement is to produce a complete checkpoint while preserving the transcript on failure. The observations above are from the installed client and synthetic requests, not an end-to-end replay of a private user conversation.
Suggested mapping or implementation notes
Prefer fixing the generation/insertion-budget coupling in Aside. If OpenCodex provides a compatibility option, keep it explicit and narrow. Our temporary local mitigation recognizes only the exact tool-free Aside summary shape, GLM-5.3-Flash on the Z.AI endpoint, an integer output cap 1..1024, and bounded input size; it raises the budget to8192 and lowers an already-high effort to low at the final physical adapter. Ordinary turns and the client's truncation/context checks remain unchanged. This is a local workaround, not a proposed universal provider default.
Additional context and attachments
Focused local regression coverage: 33 tests / 67 assertions. Synthetic before/after requests exercised the actual proxy/provider path. No full upstream suite or private task recovery is claimed. Searches for the exact error and Aside compaction found no matching issue. Related #4872 concerns manual Codex compaction routing; #3063 concerns compact failover, rather than this client's tiny summary budget.
Checks
Client or integration
Other: Aside desktop, daemon 1.26.921.1617, macOS arm64.
Provider or upstream service
Z.AI GLM-5.3-Flash through a nested OpenCodex combo, using the openai-chat adapter and the Z.AI coding endpoint.
OpenCodex version
2.59.0 (observed before the local mitigation).
Endpoint or capability
/v1/chat/completions; translated combo routing; client-side context compaction; reasoning/output token budget.
Current behaviour
Aside reports:
Context overflow recovery failed: Compaction failed: summary hit the token limit; the original transcript was preserved.This appears to originate in the client's emergency-compaction budgeting, not an HTTP server failure. In the installed Aside code, low output headroom can reduce compaction reserveTokens to 1024. Ordinary summaries then request floor(0.8reserve)=819 output tokens; split-turn prefix summaries request floor(0.5reserve)=512. The parent's thinking level is inherited. A length-terminated summary is rejected, correctly preserving the original transcript.
A synthetic request through the actual nested combo returned HTTP 200, finish_reason=length, completion_tokens=512 including reasoning_tokens=411; the requested Next Steps section was missing. Setting low reasoning only at ingress can be ineffective when nested combo defaultEffort overrides it later.
Expected behaviour
Client compaction needs enough generation budget for a complete structured checkpoint, independently from space reserved for inserting that checkpoint into the next turn. The client must still validate the final context size and reject truncated summaries. A dedicated summary effort should survive combo routing when explicitly selected.
This report requests compatibility triage and guidance on the appropriate client/proxy boundary, not a global override of callers' max_tokens.
Minimal redacted request or reproduction
<conversation>...synthetic transcript...</conversation>plus structured checkpoint instructions; no tools. The affected output cap is 512 or 819.No private transcript, credentials, account identifiers, session IDs or machine paths are attached.
Actual response or error
Synthetic before: HTTP 200; finish_reason=length; 4789 prompt tokens; 512 completion tokens; 411 reasoning tokens; incomplete checkpoint.
Synthetic after the bounded final-adapter mitigation: finish_reason=stop; 318 completion tokens; 0 reasoning tokens; required synthetic identifiers and Next Steps retained.
Long streaming comparison: 29219 prompt tokens; original requested cap819; after mitigation finish_reason=stop, 351 completion tokens, required identifiers and Next Steps retained.
Upstream documentation
No public Aside specification for this internal emergency budget contract was found. The concrete client requirement is to produce a complete checkpoint while preserving the transcript on failure. The observations above are from the installed client and synthetic requests, not an end-to-end replay of a private user conversation.
Suggested mapping or implementation notes
Prefer fixing the generation/insertion-budget coupling in Aside. If OpenCodex provides a compatibility option, keep it explicit and narrow. Our temporary local mitigation recognizes only the exact tool-free Aside summary shape, GLM-5.3-Flash on the Z.AI endpoint, an integer output cap 1..1024, and bounded input size; it raises the budget to8192 and lowers an already-high effort to low at the final physical adapter. Ordinary turns and the client's truncation/context checks remain unchanged. This is a local workaround, not a proposed universal provider default.
Additional context and attachments
Focused local regression coverage: 33 tests / 67 assertions. Synthetic before/after requests exercised the actual proxy/provider path. No full upstream suite or private task recovery is claimed. Searches for the exact error and Aside compaction found no matching issue. Related #4872 concerns manual Codex compaction routing; #3063 concerns compact failover, rather than this client's tiny summary budget.
Checks