hermes-agent/website/docs/developer-guide
Teknium 5e1b50115f feat(compression): native OpenAI Responses server-side compaction for gpt-5.6
Opt-in via compression.codex_responses_native (default: false). When enabled,
gpt-5.6-family models on the direct OpenAI API (api.openai.com) or a ChatGPT
Codex subscription send context_management=[{type: compaction,
compact_threshold: N}] on Responses requests. OpenAI compacts server-side and
returns an encrypted compaction output item; Hermes captures it into the
existing codex_reasoning_items sidecar and replays it on later turns in place
of the pruned history — inheriting persistence, session replay, the
cross-issuer guard, and the encrypted-replay kill switch with zero new state.

Scope is deliberately hard-gated (agent/native_compaction.py, re-checked per
request): gpt-5.6 family only — gpt-5.1/5.2 fail server-side on the field
(HTTP 500 / stream stall, no structured rejection; live-verified) — and
direct OpenAI/Codex routes only; xAI, GitHub/Copilot, OpenRouter, relays,
and local servers never see the field.

Hermes' local compression stays armed as the fallback owner: the native
threshold is clamped ~8K tokens below the local trigger so the server
compacts first, and a structured provider rejection of context_management
disables native compaction for the session and retries without it
(one-shot guard in TurnRetryState).

Live-verified E2E on api.openai.com/gpt-5.6: server compaction fired at a
4K threshold, checkpoints captured and replayed, recall preserved across
3 turns; gpt-5.1 with the flag enabled stays clean (field never sent).

Direction credit: PR #76950 by @laryhorb explored native Responses
compaction; this is a minimal reimplementation on current main.
2026-08-08 11:24:45 -07:00
..
plugins
_category_.json
acp-internals.md
adding-platform-adapters.md
adding-providers.md
adding-tools.md
agent-loop.md
architecture.md
browser-provider-plugin.md
browser-supervisor.md
codebase-ownership.md
context-compression-and-caching.md feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
context-engine-plugin.md
contributing.md
creating-skills.md
cron-internals.md
desktop-plugin-sdk.md
egress-internals.md
extending-the-cli.md
gateway-internals.md
image-gen-provider-plugin.md
memory-provider-plugin.md
model-provider-plugin.md
plugin-llm-access.md
programmatic-integration.md
prompt-assembly.md
provider-runtime.md
secret-source-plugin.md
session-storage.md
subagent-lifecycle-api.md
tools-runtime.md
trajectory-format.md
video-gen-provider-plugin.md
web-search-provider-plugin.md
worktree-ui-dev.md