GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Model in BUILD mode does not have enough context to continue after compaction · Issue #3031 · anomalyco/opencode

Model in BUILD mode does not have enough context to continue after compaction #3031

New issue
Copy link
New issue
Copy link
Closed
gignit/opencode
#4
gignit/opencode#4
Closed
Model in BUILD mode does not have enough context to continue after compaction#3031
gignit/opencode
#4
Copy link
Assignees
thdxr

Description

@agladysh
agladysh
opened on Oct 8, 2025
Issue body actions

Compaction summaries are too basic, and do not include context sufficient information for the model to continue work when compaction happens in BUILD mode, leading to nonsensical changes and wasted work.

On compaction, ask the model to prepare a detailed handoff document for it to continue the work after the context window reset. Ask the model to prepare the list of documents and files defining the work being done, as well as files that were or would be changed during the work. Include these files and git status -sbu in the context after compaction.

P.S. I have a suspicion that AGENTS.md is not included in the context after compaction (it should), but I did not verify it rigourously.

Reacted by Alexis Okuwa, justfortheloveof and Marcell

Activity

  1. github-actions commented on Oct 8, 2025

    @github-actions
    github-actionsBot
    on Oct 8, 2025 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Session automatically compacted, destroying the entire working context #2945: Session automatically compacted, destroying the entire working context - describes same issue where compaction destroys working context in build mode
    • compact causes llm to forget convo #2234: compact causes llm to forget convo - model forgets conversation context after compaction, leading to starting fresh
    • Preload instructions after /compact #940: Preload instructions after /compact - requests automatic preloading of instructions after compaction to maintain context
    • [Feature Request] Add User Controls for Context Management #1990: Add User Controls for Context Management - broader feature request for context management that could address compaction issues

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 8, 2025

    @rekram1-node
    rekram1-node
    on Oct 8, 2025
    Member
    More actions

    P.S. I have a suspicion that AGENTS.md is not included in the context after compaction (it should), but I did not verify it rigourously.

    It is included

  3. rekram1-node commented on Oct 8, 2025

    @rekram1-node
    rekram1-node
    on Oct 8, 2025
    Member
    More actions

    Compaction summaries are too basic, and do not include context sufficient information for the model to continue work when compaction happens in BUILD mode, leading to nonsensical changes and wasted work.

    yeah the prompt could use some work

  4. rekram1-node
    assigned
    thdxr
    on Oct 8, 2025
  5. tuxillo commented on Dec 21, 2025

    @tuxillo
    tuxillo
    on Dec 21, 2025
    More actions

    P.S. I have a suspicion that AGENTS.md is not included in the context after compaction (it should), but I did not verify it rigourously.

    It is included

    there must be some use cases where it is not because i find myself reminding it over and over that there is an AGENTS.md in the root of the project 😄

  6. maxeonyx commented on Jan 12, 2026

    @maxeonyx
    maxeonyx
    on Jan 12, 2026
    More actions

    @agladysh I have a PR which will support custom prompts for compaction. I have been having great success with the following custom prompt (although, I have mostly used it with Opus 4.5, so bears testing for other models.)

    ---
    description: Compact & hand over
    compact: true
    ---
    
    Curate a hand-over note from this conversation, so that a new agent can take over and continue aiding the user.
    
    The new agent will have no context except what you provide in the note - so focus on informing them of everything they will need (while leaving out anything they won't need).
    
    Pay attention to the vibe, the exact workflow. Record some interactions or habits that went well - put the abridged examples in the note. Show by example!
    
    Make sure that the note contains all of:
    
    - The goal of this work, keeping specific wording by the user as much as possible.
    - The history of the conversation & work, especially open threads or things that may be useful going forward.
    - Specific commands that will be useful, specific filenames that will be useful, other specific details.
    - Briefly, any issues that were encountered and the solution, to save the new agent doing any debugging again.
    
    If the last message was one from the user, please include it exactly, at the very end of the note.
    
    Focus on including details that would not be recoverable, or that would take time to do so, but feel free to leave out anything that the new agent would easily discover themselves, and encourage them to do so.
    
    Take the time and space to do a good job of representing the work & demonstrating to the new agent how to seamlessly continue it.
    
  7. leohenon commented on Feb 17, 2026

    @leohenon
    leohenon
    on Feb 17, 2026
    More actions

    Another potential improvement: include the last user prompt in the compaction replay message. Right now the model only sees the summary after compaction but loses the original request. Including it would give better continuity, especially during auto-compaction mid-task.

    Reacted by Mahmoud Mabrouk and Alfie John
  8. github-actions commented on Apr 19, 2026

    @github-actions
    github-actionsBot
    on Apr 19, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  9. github-actions
    closed this as completedon Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.