Skip to content

Forked session inherits full uncompressed context after parent compaction, causing "exceeds model context limit" #26707

@inssk

Description

@inssk

Description

When a long-running session is compacted and then forked, the forked session receives the full uncompressed context (pre-compaction history) rather than the compacted continuation summary. This causes the forked session to immediately hit "Conversation history too large to compact - exceeds model context limit."

Plugins

No response

OpenCode version

1.14.27

Steps to reproduce

  1. Start a long session with significant tool use and code changes (enough to trigger compaction)
  2. Let the session auto-compact (or trigger /compact manually)
  3. Verify the parent session is working normally with compacted context
  4. Fork the compacted session via TUI (Ctrl+S or session list → fork)
  5. Open the forked session → immediately see:
    Conversation history too large to compact - exceeds model context limit

Screenshot and/or share link

Session too large to compact - context exceeds model limit even after stripping media

Operating System

debian 13

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions