hermes-agent/agent
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
..
lsp
…
monitoring
…
pet
…
proxy_sources
…
secret_sources
…
transports feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
verify Integrate verify subsystem with the existing verification stack 2026-08-07 10:11:05 -07:00
__init__.py
…
account_usage.py
…
agent_init.py feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
agent_runtime_helpers.py feat(agent): read_window_below tool — which OS window is underneath the desktop app 2026-08-08 12:17:50 -05:00
anthropic_adapter.py
…
async_utils.py
…
aux_accounting.py
…
auxiliary_client.py fix(auxiliary): widen effective provider to relay, logging, and endpoint detection 2026-08-07 16:56:37 +05:30
azure_identity_adapter.py
…
backend_identity.py
…
background_review.py
…
battery.py
…
bedrock_adapter.py
…
billing_links.py
…
billing_usage.py
…
billing_view.py
…
bounded_response.py
…
browser_provider.py
…
browser_registry.py
…
chat_completion_helpers.py feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
codex_responses_adapter.py feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
codex_runtime.py
…
coding_context.py
…
context_breakdown.py
…
context_compressor.py refactor(compression): fold simplify findings — dedup floor constant, drift-guard test 2026-08-08 14:27:31 +05:30
context_engine.py Revert "fix: rewire DCP context engine to current main architecture" 2026-08-08 23:09:45 +05:30
context_references.py fix(docker): read attached binary files in backend (#76577) 2026-08-08 05:44:18 -07:00
conversation_compression.py
…
conversation_loop.py feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
copilot_acp_client.py
…
credential_persistence.py
…
credential_pool.py
…
credential_sources.py
…
credits_tracker.py
…
curator.py
…
curator_backup.py refactor: fold simplify findings — 6th copy in update_cmd, drop dead wrapper + speculative kwarg, behavior-contract tests 2026-08-08 15:10:35 +05:30
delegation_context.py
…
display.py
…
error_classifier.py fix: show explicit member spend cap message instead of 'no credits' 2026-08-07 19:47:40 +05:30
errors.py
…
estop.py fix: post-merge audit follow-ups for #81138/#81139/#81141/#81148 2026-08-08 05:21:09 -07:00
file_safety.py
…
gemini_native_adapter.py
…
gemini_schema.py
…
i18n.py
…
image_gen_provider.py
…
image_gen_registry.py
…
image_routing.py
…
insights.py
…
interrupt_compat.py
…
iteration_budget.py
…
jiter_preload.py
…
kanban_stop.py
…
learn_prompt.py fix(learn): process large sources incrementally 2026-08-08 05:09:43 -07:00
learning_graph.py
…
learning_graph_render.py
…
learning_mutations.py
…
lmstudio_reasoning.py
…
manual_compression_feedback.py
…
markdown_tables.py
…
memory_manager.py
…
memory_provider.py
…
message_content.py
…
message_sanitization.py fix(agent): preserve destroyed tool-call argument bytes in the WARNING log 2026-08-07 16:57:11 +05:30
moa_loop.py
…
moa_trace.py
…
model_metadata.py
…
models_dev.py
…
moonshot_schema.py
…
native_compaction.py feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
nous_rate_guard.py
…
onboarding.py
…
oneshot.py
…
outbound_webhooks.py
…
plugin_llm.py
…
portal_tags.py
…
process_bootstrap.py
…
prompt_builder.py Port from superagent-ai/grok-cli: directory-chain AGENTS.md loading 2026-08-08 04:31:45 -07:00
prompt_caching.py fix(agent): make the send-path copy structural — close the write-through class 2026-08-07 16:57:11 +05:30
rate_limit_tracker.py
…
reactions.py
…
reasoning_summaries.py
…
reasoning_timeouts.py
…
redact.py polish: document newline residual, reuse span local, cheap check first 2026-08-07 17:50:03 +05:30
relay_llm.py
…
relay_runtime.py
…
relay_tools.py
…
replay_cleanup.py
…
retry_utils.py
…
runtime_cwd.py
…
secret_scope.py
…
session_activity.py
…
shell_hooks.py Inspired by Cursor: fail-closed hook semantics + exit-code-2 blocking 2026-08-08 05:02:04 -07:00
skill_bundles.py
…
skill_commands.py
…
skill_preprocessing.py
…
skill_utils.py
…
ssl_guard.py fix(ssl_guard): tolerate truststore SSLContext.get_ca_certs() NotImplementedError on Windows 2026-08-08 15:10:24 +05:30
ssl_verify.py
…
stream_diag.py
…
stream_single_writer.py
…
subagent_lifecycle.py
…
subdirectory_hints.py
…
subscription_view.py
…
system_prompt.py fix: revert except ImportError back to except Exception 2026-08-08 13:57:44 +05:30
think_scrubber.py
…
thinking_timeout_guidance.py
…
thread_scoped_output.py
…
title_generator.py
…
tool_dispatch_helpers.py
…
tool_executor.py feat(agent): read_window_below tool — which OS window is underneath the desktop app 2026-08-08 12:17:50 -05:00
tool_guardrails.py
…
tool_result_classification.py
…
trace_upload.py
…
trajectory.py
…
transcription_provider.py
…
transcription_registry.py
…
tts_provider.py
…
tts_registry.py
…
turn_context.py fix(agent): stop reference-only compaction handoff from becoming the active turn 2026-08-07 19:44:35 +05:30
turn_finalizer.py fix(agent): classify session-persistence failures so lock contention is not misdiagnosed as disk-full 2026-08-08 14:18:26 +05:30
turn_retry_state.py feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
turn_summary.py
…
usage_pricing.py
…
verification_evidence.py Integrate verify subsystem with the existing verification stack 2026-08-07 10:11:05 -07:00
verification_stop.py Integrate verify subsystem with the existing verification stack 2026-08-07 10:11:05 -07:00
verify_hooks.py
…
vertex_adapter.py
…
video_gen_provider.py
…
video_gen_registry.py
…
web_search_provider.py
…
web_search_registry.py
…