feat(agent): add Codex-native compaction paths

This commit is contained in:
hmirin
2026-06-28 01:35:40 +09:00
committed by Teknium
parent 8fc1cb754b
commit d1c8c03416
14 changed files with 869 additions and 2 deletions
+22
View File
@@ -410,6 +410,21 @@ compression:
# Trigger compression at this % of model's context limit (default: 0.50 = 50%)
# Lower values = more aggressive compression, higher values = compress later
threshold: 0.50
# Existing Codex gpt-5.5 behavior: raise Hermes' compaction trigger to 85%
# for the ChatGPT Codex OAuth route. Set false to opt back down to threshold.
codex_gpt55_autoraise: true
# Codex-native compaction paths are opt-in (default: false) to preserve
# Hermes' existing auxiliary summarizer behavior for existing installs.
# When true, Codex OAuth uses Responses API compact and Codex app-server
# compaction uses the app-server thread compact API.
codex_native_compaction: false
# Codex OAuth / Responses API compaction trigger (default: 0.85 = 85%).
# Used only when codex_native_compaction is true. The recent tail still uses
# protect_last_n below.
codex_responses_threshold: 0.85
# Fraction of the threshold to preserve as recent tail (default: 0.20 = 20%)
# e.g. 20% of 50% threshold = 10% of total context kept as recent messages.
@@ -422,6 +437,13 @@ compression:
# compression of older turns.
protect_last_n: 20
# Codex app-server auto-compaction mode:
# Used only when codex_native_compaction is true.
# native = let Codex decide when to compact its own thread (default)
# hermes = let Hermes threshold trigger Codex thread/compact/start
# off = Hermes will not auto-trigger compaction; Codex may still compact natively
codex_app_server_auto: native
# Number of non-system messages to protect at the head of the transcript, in
# ADDITION to the system prompt (which is always implicitly protected).
# Head messages are NEVER summarized — they survive every compression