Skip to content

Track durable growth from nested instructions and skill activations #38781

Description

@opencode-agent

Problem

V2 compaction bounds active model context, but dynamically loaded instruction-like conversation records continue accumulating in durable session history:

  • Nested AGENTS.md discovery appends synthetic messages (intended once per path per session).
  • Every skill invocation appends a skill message, including repeated activation of the same skill.

Completed compaction excludes older records from active context but does not prune or coalesce them in durable storage. A sufficiently long-lived session can therefore grow without bound on disk.

Scope

Track a later optimization for durable storage without changing current model-facing compaction semantics. Potential approaches include archival, checkpoint-aware pruning, or coalescing records whose relevant state is already represented elsewhere.

Any design should preserve:

  • Correct post-compaction continuation.
  • Nested-instruction deduplication across process or Location-layer restarts.
  • Whatever replay, fork, revert, and audit guarantees V2 intends to support.
  • Repeated skill activation when it is semantically meaningful.

Notes

This is not an immediate correctness blocker; active context is already bounded by compaction. It is a long-session storage-growth concern.

Source discussion: https://slack.com/archives/C0BE69AHCQP/p1784941847513000

Requested by: @rekram1-node (Aiden Cline via Slack)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions