core-agent-ide/codex-rs/core/templates/compact
Ahmed Ibrahim 0b28e72b66
Improve compact (#6692)
This PR does the following:
- Add compact prefix to the summary
- Change the compaction prompt
- Allow multiple compaction for long running tasks
- Filter out summary messages on the following compaction

Considerations:
- Filtering out the summary message isn't the most clean
- Theoretically, we can end up in infinite compaction loop if the user
messages > compaction limit . However, that's not possible in today's
code because we have hard cap on user messages.
- We need to address having multiple user messages because it confuses
the model.

Testing:
- Making sure that after compact we always end up with one user message
(task) and one summary, even on multiple compaction.
2025-11-15 07:17:51 +00:00
..
prompt.md feat: compactor 2 (#6027) 2025-10-31 14:27:08 -07:00
summary_prefix.md Improve compact (#6692) 2025-11-15 07:17:51 +00:00