一键导入
context-and-continuity
Manage context pressure, configure message windowing, and use checkpoint tools to preserve critical findings across context compaction.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage context pressure, configure message windowing, and use checkpoint tools to preserve critical findings across context compaction.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Agentic harness diagnostic + improvement loop. Probes the framework with real model runs, uses the rax-diagnose CLI to root-cause failures from structured trace data, ships ONE coordinated architectural fix, verifies via before/after diff, commits with empirical evidence. Use at the start of any harness improvement session — replaces ad-hoc grep + log-spelunking with a deterministic feedback loop.
Use when the architecture may have drifted from documentation, packages have grown complex, dead code or disabled systems are suspected, or before planning a major refactor — scoped to the reactive-agents-ts 22-package monorepo.
Reactive Agents framework architecture — layer stack, dependency graph, build order, and package structure. Use when planning work, understanding package relationships, or determining build dependencies.
Use when analyzing the Reactive Agents codebase for architectural improvements, abstraction opportunities, composability gaps, or Effect-TS engineering quality — before proposing refactors, during design reviews, or when codebase complexity is growing.
LLMService API contract — the correct signatures for complete(), stream(), embed(), and response types. Use when calling LLMService from any layer, writing reasoning strategies, or building LLM-dependent features.
LLM provider streaming patterns and per-provider quirks. Use when adding a new provider, implementing adapter hooks, or debugging streaming tool call behavior in packages/llm-provider.
| name | context-and-continuity |
| description | Manage context pressure, configure message windowing, and use checkpoint tools to preserve critical findings across context compaction. |
| compatibility | Reactive Agents TypeScript projects using @reactive-agents/* |
| metadata | {"author":"reactive-agents","version":"2.0","tier":"capability"} |
Produce an agent that survives long tasks without losing key findings — correct windowing configuration, explicit checkpoint tool usage, and cross-session memory where needed.
const agent = await ReactiveAgents.create()
.withProvider("anthropic")
.withReasoning({ defaultStrategy: "adaptive", maxIterations: 20 })
.withTools({
allowedTools: ["web-search", "file-read", "checkpoint", "recall", "find"],
})
.withMemory({ tier: "enhanced", dbPath: "./agent.db" })
.withSystemPrompt(`
You are a research assistant.
Use the checkpoint tool to save key findings before moving on.
Call checkpoint() with no args to review what you've saved.
`)
.build();
The checkpoint tool has three modes:
// SAVE — persist a named finding
checkpoint("api-endpoints", "Found: /users, /orders, /products at base URL https://api.example.com")
// RETRIEVE — get a saved finding by name
checkpoint("api-endpoints")
// LIST — show all saved checkpoints
checkpoint()
Instruct the agent explicitly in the system prompt:
.withSystemPrompt(`
After each major discovery, call checkpoint(label, content) to save it.
Before writing your final answer, call checkpoint() to review all saved findings.
Never rely on context alone for facts you found more than 3 steps ago.
`)
The kernel auto-checkpoints and applies message windowing based on token utilization:
| Tier | Hard gate | Auto-checkpoint fires at |
|---|---|---|
local | 80% | 75% |
mid | 85% | 80% |
large | 90% | 85% |
frontier | 95% | 90% |
Auto-checkpoint captures successful non-meta tool observations. It is a safety net — explicit checkpoints for structured findings are better.
.withMemory()// Within-session only (default)
.withTools({ allowedTools: ["checkpoint"] })
// Cross-session persistence — findings survive agent restarts
.withMemory({ tier: "enhanced", dbPath: "./research-memory.db" })
.withTools({ allowedTools: ["checkpoint", "recall", "find"] })
// recall — semantic search over past episodic memory
// find — exact lookup by memory key
// Lower maxIterations forces tighter reasoning loops
.withReasoning({ defaultStrategy: "adaptive", maxIterations: 12 })
// Use plan-execute-reflect to front-load planning and avoid re-exploring
.withReasoning({ defaultStrategy: "plan-execute-reflect", maxIterations: 15 })
| Method | Key params | Notes |
|---|---|---|
.withTools({ allowedTools }) | include "checkpoint", "recall", "find" | Checkpoint is a built-in meta-tool |
.withMemory(opts?) | { tier: "enhanced", dbPath } | Episodic + semantic memory persist across sessions |
.withReasoning({ maxIterations }) | number | Lower = tighter loops = less context pressure |
.withSystemPrompt(s) | string | Instruct agent to use checkpoint tool proactively |
checkpoint(label, content) for those.withMemory({ tier: "enhanced" }) without dbPath uses a default path; set explicitly in multi-agent environments to prevent collisionsrecall and find tools require .withMemory() — enabling them without memory configured is a no-op