You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to use OpenSpec when context exceeds limits or requirements change after implementation? #257
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 /summarize to 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 /summarize to 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.
If you're using your own custom schema, what you can do is modify the schema.yaml file under openspec/schemas/spec-driven-custom/schema.yaml and 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.
Activity
qulingyuan commentedon Oct 30, 2025
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.wuyezhong commentedon Oct 30, 2025
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.
docs: close recurring gaps (existing projects, editing changes, unins…
docs: comprehensive overhaul — discoverability, explore-first, and cl…
docs: comprehensive overhaul — discoverability, explore-first, and cl…
basilmusa commentedon Jul 20, 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.
clay-good commentedon Jul 23, 2026
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.