Add support for /compact

Resolved 💬 7 comments Opened Oct 8, 2025 by rucinski-ttp Closed Jan 21, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the VS Code extension are you using?

0.4.19

Which IDE are you using?

VS Code

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What steps can reproduce the bug?

After using the tool for a short while, the conversation is unable to continue, with the error Codex ran out of room in the model's context window. Start a new conversation or clear earlier history before retrying.

What is the expected behavior?

Similar to the CLI tool, the chat should be condensed and summarised to free up space and allow the conversation to continue. This would be either automatic when the context window limit is reached, or manually through a button.

What do you see instead?

When this limit is hit, the conversation has to be abandoned and a new chat started.

Additional information

_No response_

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 9 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4868
  • #4813
  • #3967

Powered by Codex Action

ishwar00 · 8 months ago

Guys I really need this, Please if possible pick this on priority. This is the only feature that is keeping me away from using codex.

rucinski-ttp · 7 months ago
Guys I really need this, Please if possible pick this on priority. This is the only feature that is keeping me away from using codex.

I don't think they've added /compact as manual command, butthey have added automatic compaction into the vs code extension, does that help?

ishwar00 · 7 months ago

I use it in cursor, but I'm good, gpt-5.1-codex-max does compaction automatically. Thank you

matixlol · 7 months ago

I see there's a /compact command now, close?

ishwar00 · 7 months ago

we don't have /compact command yet, models themselves do the compaction now https://openai.com/index/gpt-5-1-codex-max/

@matixlol

etraut-openai contributor · 6 months ago

With the latest models, compaction is now performed automatically. Manual compaction should no longer be needed, so we're unlikely to expose a manual compaction command in the IDE extension. The command is still available in the CLI, but we will likely deprecate that eventually. Our long-term goal is to eliminate the need for developers to think about compaction and context window management.