hermes-agent/agent
teknium1 7e714ac48e feat: use Codex-style compaction prompt for context compression
Replace the generic summarization prompt ('Summarize these conversation
turns concisely') with a task-oriented handoff prompt inspired by
OpenAI's Codex CLI compaction flow (researched in #499).

The new prompt frames compression as a 'CONTEXT CHECKPOINT COMPACTION'
and instructs the summarization model to produce a structured handoff
summary that includes:
- Current progress and key decisions
- User preferences and constraints discovered
- Clear next steps remaining
- Critical data (file paths, URLs, error messages, code snippets)
- Tool calls made and their key results

This produces better summaries because the model understands the summary
will be used by another LLM to continue the work, rather than treating
it as a generic text compression task.

No behavioral change to the compression algorithm itself — same
positional protection, same role alternation, same [CONTEXT SUMMARY]:
prefix. Only the prompt sent to the summarization model changes.

Inspired by PR #776 by @kshitijk4poor.
2026-03-14 02:11:24 -07:00
..
__init__.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
anthropic_adapter.py fix: preserve Anthropic cache markers through adapter (#1205) 2026-03-13 13:27:03 -07:00
auxiliary_client.py fix(cli): respect HERMES_HOME in all remaining hardcoded ~/.hermes paths 2026-03-13 21:32:53 -07:00
context_compressor.py feat: use Codex-style compaction prompt for context compression 2026-03-14 02:11:24 -07:00
display.py Merge PR #736: feat(honcho): async writes, memory modes, session title integration, setup CLI 2026-03-12 19:05:11 -07:00
insights.py chore: add GLM/Kimi/MiniMax models to insights pricing (zero cost) 2026-03-06 19:12:14 -08:00
model_metadata.py fix(anthropic): live model fetching + adaptive thinking for 4.5+ models 2026-03-12 17:04:31 -07:00
prompt_builder.py fix(cli): respect HERMES_HOME in all remaining hardcoded ~/.hermes paths 2026-03-13 21:32:53 -07:00
prompt_caching.py fix(cache_control) treat empty text like None to avoid anthropic api cache_control error 2026-03-13 18:08:46 -07:00
redact.py feat: secure skill env setup on load (core #688) 2026-03-13 03:14:04 -07:00
skill_commands.py feat: secure skill env setup on load (core #688) 2026-03-13 03:14:04 -07:00
trajectory.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00