Allowing compact to be triggered by prompts in VSCode

Resolved 💬 3 comments Opened Apr 18, 2026 by SandboChang Closed Apr 18, 2026

What variant of Codex are you using?

VSCode extension

What feature would you like to see?

A recurring failure mode I’ve observed is that the model sometimes quits a chat when the context window reaches ~95% usage, but before automatic compaction is triggered.

In these cases, the session ends abruptly without any closing message. This is different from a normal termination where the model provides a summary of work done. Instead, it simply stops mid-process. For example, I’ve seen it polling results as expected, with no indication of failure or completion, and then the chat just ends.

I’m aware that in the CLI there are ways to manually trigger earlier compaction. Is there an equivalent mechanism available in the VSCode Codex extension?

One way I can suggest is the compact action can be triggered in prompt, for example, after each iteration of a task. This will allow us to ensure the compact happens early enough to avoid cutting off.

Additional information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗