[FEATURE]: Allow pinning important instructions/messages per session to keep them after compaction. #6507

Open
opened 2026-02-16 18:04:25 -05:00 by yindo · 4 comments
Owner

Originally created by @Killusions on GitHub (Jan 16, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

To enable "Ralph loop" and similar long-running use-cases while still getting the benefits of compaction, there should be a built-in way to pin certain messages (similar to Agents.md instructions but per-session) so they are re-inserted after compaction.

Additionally, the model should be encouraged to check open tasks after compaction.

Originally created by @Killusions on GitHub (Jan 16, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request To enable "Ralph loop" and similar long-running use-cases while still getting the benefits of compaction, there should be a built-in way to pin certain messages (similar to Agents.md instructions but per-session) so they are re-inserted after compaction. Additionally, the model should be encouraged to check open tasks after compaction.
yindo added the discussion label 2026-02-16 18:04:25 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

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

  • #4659: Sliding window context management for long-running sessions (proposes 'inception messages' that survive compaction)
  • #3032: Soft compaction / AI global workspace metabolism (proposes preserving important context during compaction)
  • #7579: Save plan to file for token efficiency and compaction persistence (addresses compaction losing critical context)
  • #4317: Feature: generic /compact command, auto-compaction, and fork-aware conversations (comprehensive compaction framework)

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

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #4659: Sliding window context management for long-running sessions (proposes 'inception messages' that survive compaction) - #3032: Soft compaction / AI global workspace metabolism (proposes preserving important context during compaction) - #7579: Save plan to file for token efficiency and compaction persistence (addresses compaction losing critical context) - #4317: Feature: generic /compact command, auto-compaction, and fork-aware conversations (comprehensive compaction framework) Feel free to ignore if none of these address your specific case.
Author
Owner

@Killusions commented on GitHub (Jan 17, 2026):

Tried implementing this in a PR #9097

@Killusions commented on GitHub (Jan 17, 2026): Tried implementing this in a PR #9097
Author
Owner

@TomLucidor commented on GitHub (Jan 20, 2026):

Related? https://github.com/anomalyco/opencode/issues/6535

@TomLucidor commented on GitHub (Jan 20, 2026): Related? https://github.com/anomalyco/opencode/issues/6535
Author
Owner

@Killusions commented on GitHub (Jan 21, 2026):

@TomLucidor Kind of, but not really, this is not about keeping the system prompt but user selected "pinned" prompts

@Killusions commented on GitHub (Jan 21, 2026): @TomLucidor Kind of, but not really, this is not about keeping the system prompt but user selected "pinned" prompts
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6507