π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
Checkpoint: File edits
rUvc245ba1c4403
diff --git a/.claude/helpers/context-persistence-hook.mjs b/.claude/helpers/context-persistence-hook.mjsindex cad403d7a2..4bbfdc32fb 100644--- a/.claude/helpers/context-persistence-hook.mjs+++ b/.claude/helpers/context-persistence-hook.mjs@@ -1610,15 +1610,15 @@ async function runAutopilot(transcriptPath, sessionId, backend, backendType) {let optimizationMessage = '';- // Phase 1: Warning zone (70-85%)+ // Phase 1: Warning zone (70-85%) β advise concise responsesif (percentage >= AUTOPILOT_WARN_PCT && percentage < AUTOPILOT_PRUNE_PCT) {if (!state.warningIssued) {state.warningIssued = true;- optimizationMessage = ' | Approaching limit β archiving aggressively.';+ optimizationMessage = ` | Context at ${(percentage * 100).toFixed(0)}%. Keep responses concise to extend session.`;}}- // Phase 2: Prune zone (85%+) β actively optimize+ // Phase 2: Critical zone (85%+) β session rotation neededif (percentage >= AUTOPILOT_PRUNE_PCT) {state.pruneCount++;@@ -1632,7 +1632,8 @@ async function runAutopilot(transcriptPath, sessionId, backend, backendType) {} catch { /* non-critical */ }}- optimizationMessage += ' | Context near capacity β keeping responses concise.';+ const turnsLeft = Math.max(0, Math.ceil((1.0 - percentage) / 0.03));+ optimizationMessage += ` | CRITICAL: ${(percentage * 100).toFixed(0)}% context used (~${turnsLeft} turns left). All ${turns} turns archived. Start a new session with /clear β context will be fully restored via SessionStart hook.`;}const report = buildAutopilotReport(percentage, tokens, CONTEXT_WINDOW_TOKENS, turns, state);