Repository navigation
How to use OpenSpec when context exceeds limits or requirements change after implementation? #257
Description
Activity
In cursor, you can use
/summarizeto summarize the context in order to free up context window space. I don't know if there's a similar command in Claude Code.It's likely that the context exceeds the limits during implementation, or that the requirements change after implementation is complete. How should we handle such cases? The three commands provided in Claude—proposal, apply, and archive—don’t seem to address these scenarios very elegantly.
In cursor, you can use
/summarizeto summarize the context in order to free up context window space. I don't know if there's a similar command in Claude Code.It's likely that the context exceeds the limits during implementation, or that the requirements change after implementation is complete. How should we handle such cases? The three commands provided in Claude—proposal, apply, and archive—don’t seem to address these scenarios very elegantly.
In Claude, there’s a /compact command that can do something similar, but that’s not what I’m looking for. I believe OpenSpec itself should provide commands to load a spec that’s already partially processed, and to handle requirement changes for a spec that’s already been implemented.
- added a commit that references this issue
on Jun 22, 2026 - added a commit that references this issue
on Jun 24, 2026 - added a commit that references this issue
on Jun 30, 2026 If you're using your own custom schema, what you can do is modify the
schema.yamlfile underopenspec/schemas/spec-driven-custom/schema.yamland in the tasks line (search for the line that has- id: tasks) modify the instruction section by mentioning that "Add a final task at the end of each task group to instruct the llm to compact the conversation while preserving any relevant context from the previous conversation that would help in tackling upcoming tasks."Then when you run apply, during the implementation compaction will take place after each group of tasks have completed implementation.
Closing, the FAQ answers both halves now: openspec.dev/docs/faq, under "What if my session runs out of context, or requirements change mid-implementation?".
Context runs out: the plan lives in files, not in your chat history. Clear the context, open a fresh session, run
/opsx:apply, and it resumes from the first unchecked task. This is the recommended move rather than damage control, since a clean context window produces better results anyway.Requirements changed: edit the artifacts to match the new reality and continue.
/opsx:update(#1278, v1.6.0) makes that revision and keeps the other artifacts consistent with it.
It's likely that the context exceeds the limits during implementation, or that the requirements change after implementation is complete. How should we handle such cases? The three commands provided in Claude—proposal, apply, and archive—don’t seem to address these scenarios very elegantly.