feat(opencode): context edit v2 — classifier, lifecycle markers, thread distillation#5
Merged
feat(opencode): context edit v2 — classifier, lifecycle markers, thread distillation#5
Conversation
12349a0 to
36be45b
Compare
36be45b to
c746a02
Compare
6 tasks
89cb54f to
46a34e5
Compare
…ad distillation Context editing improvements: - query and toolName targeting for context_edit (no raw IDs needed) - Lifecycle markers on parts: discardable, ephemeral, side-thread, pinned - Deterministic sweeper auto-hides/externalizes expired markers - Privileged agents (focus, compaction) can edit any message - /reset-context command restores all edits from CAS New tools: - classifier_threads: classify messages by topic (main/side/mixed) - distill_threads: classify + park side threads + store metadata Agents: - classifier: read-only, labels messages by topic (enabled by default) - focus: label-driven cleanup (disabled by default, /focus command) - focus-rewrite-history: full rewrite with user confirmation (disabled) - All agents configurable via opencode.jsonc (model, disable) Commands: - /btw: side conversation via subagent - /focus: classify + cleanup - /focus-rewrite-history: full conversation rewrite - /reset-context: undo all context edits from CAS Config-based control (no feature toggles): - Tools: set to false in tools config to disable - Agents: set disable: true, override model per-agent Documentation: - docs/context-editing.md: tools, operations, lifecycle markers - docs/schema.md: new tables, modified part fields - docs/agents.md: classifier, focus, models, configuration - Cleaned up research docs, cross-linked from README - AGENTS.md: no-bypass-hooks rule, context editing guidance
46a34e5 to
1510824
Compare
e6qu
added a commit
that referenced
this pull request
Mar 18, 2026
…ad distillation (#5) Context editing improvements: - query and toolName targeting for context_edit (no raw IDs needed) - Lifecycle markers on parts: discardable, ephemeral, side-thread, pinned - Deterministic sweeper auto-hides/externalizes expired markers - Privileged agents (focus, compaction) can edit any message - /reset-context command restores all edits from CAS New tools: - classifier_threads: classify messages by topic (main/side/mixed) - distill_threads: classify + park side threads + store metadata Agents: - classifier: read-only, labels messages by topic (enabled by default) - focus: label-driven cleanup (disabled by default, /focus command) - focus-rewrite-history: full rewrite with user confirmation (disabled) - All agents configurable via opencode.jsonc (model, disable) Commands: - /btw: side conversation via subagent - /focus: classify + cleanup - /focus-rewrite-history: full conversation rewrite - /reset-context: undo all context edits from CAS Config-based control (no feature toggles): - Tools: set to false in tools config to disable - Agents: set disable: true, override model per-agent Documentation: - docs/context-editing.md: tools, operations, lifecycle markers - docs/schema.md: new tables, modified part fields - docs/agents.md: classifier, focus, models, configuration - Cleaned up research docs, cross-linked from README - AGENTS.md: no-bypass-hooks rule, context editing guidance
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
N/A
Type of change
What does this PR do?
Context editing improvements, new agents, lifecycle markers, thread distillation, documentation.
Context editing:
queryandtoolNametargeting forcontext_edit— no raw IDs neededdiscardable,ephemeral,side-thread,pinnedwith configurable turn-based auto-cleanup/reset-contextcommand restores all edits from CASNew tools:
classifier_threads: classifies messages by topic (main/side/mixed) using the classifier agentdistill_threads: classifies messages, parks side threads, stores per-session thread metadataNew agents:
classifier: read-only, labels messages by topic (enabled by default, inherits session model)focus: label-driven context cleanup (disabled by default, invoked via/focus)focus-rewrite-history: full conversation rewrite with user confirmation (disabled by default)opencode.jsonc— model override, enable/disableCommands:
/btw: side conversation via subagent/focus: classify + cleanup/focus-rewrite-history: full conversation rewrite/reset-context: undo all context editsConfig-based control:
"tool_name": falsein tools config"agent_name": { "disable": true }in agent configDocumentation:
docs/context-editing.md: tools, operations, lifecycle markers, safety constraintsdocs/schema.md: new tables (CAS, edit graph, side threads), modified part fieldsdocs/agents.md: classifier, focus, models, configurationAGENTS.md: no-bypass-hooks rule, context editing guidanceHow did you verify your code works?
Checklist