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 — Feature: Subagents should support auto compaction · Issue #3153 · anomalyco/opencode

Feature: Subagents should support auto compaction #3153

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Feature: Subagents should support auto compaction#3153
Copy link
Assignees
thdxr

Description

@ghost
ghost
opened on Oct 13, 2025

Currently, if a subagent goes on a long task and goes over the models context limit, the whole subagent fails.

I think a good solution for this might be auto compaction for sub-agents. If a subagent goes over its context it should reject/remove items that are too big (the last tool/mcp call that sent it over context rejected?) and then auto compact in a way that allows it to continue. This makes subagents resilient and recoverable, because when they go on long tasks and fail it can cost a lot of tokens.

Appreciate all the hard work, opencode is great.

Reacted by Muhammad Yasirroni

Activity

  1. github-actions commented on Oct 13, 2025

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

    This issue might be a duplicate or closely related to existing issues. Please check:

    • Limit Subagent Tree Depth #2906: Limit Subagent Tree Depth - discusses limiting subagent depth due to context management issues
    • Soft compaction / AI global workspace metabolism #3032: Soft compaction / AI global workspace metabolism - proposes soft compaction to preserve context while managing tool calls
    • Feature request: let subagents inherit context #2588: Feature request: let subagents inherit context - discusses context management for subagents
    • Model in BUILD mode does not have enough context to continue after compaction #3031: Model in BUILD mode does not have enough context to continue after compaction - addresses insufficient context after compaction

    While your specific request for auto compaction in subagents is unique, these existing issues address related problems with subagent context management and compaction strategies. You might find useful insights or discussions there.

    Feel free to ignore if none of these address your specific case of automatic compaction for subagents hitting context limits.

  2. rekram1-node
    assigned
    thdxr
    on Oct 13, 2025
  3. rekram1-node commented on Oct 14, 2025

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

    hmm I thought it would auto compact already will need to check

    The auto compact logic isn't fool proof though

  4. rekram1-node commented on Oct 14, 2025

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

    ofc and if you ever catch me not replying just @ me haha

    yeah that very well could be it, tool overloads context and it cant recover ftom it

    Reacted by Jensen
  5. adpadillar commented on Feb 26, 2026

    @adpadillar
    adpadillar
    on Feb 26, 2026
    More actions

    i am pretty sure this exists (as of at least v1.2.14), i actually came here to open an issue caused by auto-compaction on subagents, but i think this means this can be closed since auto-compaction does work with subagents

  6. github-actions commented on Apr 28, 2026

    @github-actions
    github-actionsBot
    on Apr 28, 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.

  7. github-actions
    closed this as not plannedon Apr 28, 2026
  8. yasirroni commented on Aug 1, 2026

    @yasirroni
    yasirroni
    on Aug 1, 2026
    More actions

    I'm using a hard-coded context-window limit for the new GPT-5.6. It seems that the subagents keep going.

    The setting:

      "provider": {
        "openai": {
          "models": {
            "gpt-5.6-terra": {
              "limit": {
                "context": 229376,
                "output": 16384
              }
            },
            "gpt-5.6-luna": {
              "limit": {
                "context": 229376,
                "output": 8192
              }
            }
          },
          "options": {
            "setCacheKey": true,
            "headerTimeout": 60000,
            "timeout": 600000,
            "chunkTimeout": 60000
          }
        }
      }
    

    The context window:

    Subagent(2 of 2)300.7K (131%)
    
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.