You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add ctx_reduce_enabled config flag and independent dreamer timer
ctx_reduce_enabled (default: true) fully disables the ctx_reduce tool,
all nudges (rolling, iteration, emergency 80%), sticky turn reminders,
and prompt guidance about ctx_reduce when set to false. Heuristic
cleanup, compartments, memory, and other features remain active.
Surfaces gated: tool-registry, magic-context-prompt, nudger (no-op),
hook-handlers (emergency + sticky), system-prompt-hash (prompt
injection).
Also: dreamer schedule checks now run on an independent 15-minute
setInterval at the plugin level (src/plugin/dream-timer.ts) instead
of piggybacking on message.updated events, so overnight dreaming
triggers even when the user isn't chatting.
Copy file name to clipboardExpand all lines: src/agents/magic-context-prompt.ts
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,12 @@ NEVER drop user messages — they are short and will be summarized by compartmen
26
26
NEVER drop assistant text messages unless they are exceptionally large. Your conversation messages are lightweight; only large tool outputs are worth dropping.
27
27
Before your turn finishes, consider using \`ctx_reduce\` to drop large tool outputs you no longer need.`;
28
28
29
+
/** Intro when ctx_reduce is disabled — no drop guidance, no ctx_reduce references. */
30
+
constBASE_INTRO_NO_REDUCE=`Messages and tool outputs are tagged with §N§ identifiers (e.g., §1§, §42§).
31
+
Use \`ctx_note\` for deferred intentions — things to tackle later, not right now. NOT for task tracking (use todos). Notes survive context compression and you'll be reminded at natural work boundaries (after commits, historian runs, todo completion).
32
+
Use \`ctx_memory\` to manage cross-session project memories. Write new memories, delete stale ones, or search stored memories by category. Memories persist across sessions and are automatically injected into new sessions.
33
+
Use \`ctx_expand\` to decompress a compartment range to see the original conversation transcript. Use \`start\`/\`end\` from \`<compartment start=N end=M>\` attributes. Returns the compacted U:/A: transcript for that message range, capped at ~15K tokens.`;
34
+
29
35
constSISYPHUS_SECTION=`
30
36
### Reduction Triggers
31
37
- After collecting background agent results (explore/librarian) — drop raw outputs once you extracted what you need.
@@ -182,7 +188,16 @@ export function detectAgentFromSystemPrompt(systemPrompt: string): AgentType | n
0 commit comments