Skip to content

How to use OpenSpec when context exceeds limits or requirements change after implementation? #257

Description

@wuyezhong

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.

Activity

  1. qulingyuan commented on Oct 30, 2025

    @qulingyuan

    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.

  2. wuyezhong commented on Oct 30, 2025

    @wuyezhong
    Author

    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.

  3. basilmusa commented on Jul 20, 2026

    @basilmusa

    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.

  4. clay-good commented on Jul 23, 2026

    @clay-good
    Collaborator

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions