Post

AI Context Kit: Cross-session persistence, context compression, easier distribution

AI Context Kit: Cross-session persistence, context compression, easier distribution

Since the last update to AI Context Kit, I have been testing it in various real-world scenarios. One thing that frustrates me (and a lot of other developers) with AI-assisted development is that every session starts from zero. You load your user context, explain the project, re-establish the role, remind the assistant where you left off — and that is before you even type the first real request.

This update brings three additions to AI Context Kit v1.4.2 to address this and more: cross-session persistence via checkpoint artifacts (section 4.4), a user-confirmed context compression workflow (section 4.5), and simplified distribution for Claude Code, GitHub Copilot CLI, and OpenAI Codex. Each is covered below.

Cross-Session Persistence (new spec section 4.4)

The new section 4.4 introduces checkpoint artifacts, a structured YAML file that captures session state so it can be restored in a future conversation. By explicitly defining the format and rules for these checkpoint files, we can ensure they can be used correctly between sessions, users, and even different assistants.

Here is a sample checkpoint file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
checkpoint: true
project: "my-app"
role: "Developer"
phase: "Implementation"
output_style: "concise"
tone: "technical"
interaction_mode: "pair"
open_tasks:
  - "Complete order validation logic"
  - "Write integration tests for /api/orders"
key_decisions:
  - "Use soft delete over hard delete for order records"
  - "Paginate results with cursor-based pagination for scalability"
active_files:
  - "Services/OrderService.cs"
  - "Controllers/OrdersController.cs"
last_updated: "2026-05-12T18:00:00Z"
---

Checkpoint files must be stored outside the instruction layer — they must not modify AGENTS.md or your user context files. The checkpoint creation skill will suggest an appropriate location during the creation workflow.

The checkpoint: true marker is what makes the file self-identifying — the restore workflow checks for it first, so a regular YAML file cannot be accidentally applied as session state.

The restore rules are equally explicit: checkpoint state is only applied at session start, conflicts with active instruction files are surfaced one by one for the user to resolve, instruction files win by default if you do not respond, and nothing proceeds until you confirm the full restored state. No silent overwrites.

The assistant will propose creating a checkpoint when you signal you are wrapping up — but it will never write one without your explicit approval.

You can have a look at the full spec for this feature in the new section 4.4 of the AI Context Kit specification.

The Operational Skills: create-checkpoint and restore-checkpoint

The spec sections alone are nice to have, but they do not make behavior automatic. This is why I also introduced two skills to make this new workflow actionable:

create-checkpoint walks your AI assistant through collecting all required schema fields from the active session, drafts the artifact, presents it for your review, and writes it only after you explicitly approve. Sensitive data — credentials, private client content — is explicitly excluded.

restore-checkpoint reads the artifact, validates the checkpoint: true marker and required fields, compares each value against your active instruction files, surfaces any conflicts for resolution, and presents the full resolved state before proceeding.

Both skills are available as prompt files for one-line invocation, and they should surface automatically in your assistant’s skill picker.

Context Compression (new spec section 4.5)

Long sessions run into context window limits. With the introduction of this new section, compression is no longer a provider-side event that happens without warning and without negotiation. We are making compression a user-confirmed workflow.

When context saturation is evident, the assistant must describe what will be retained and what will be dropped — before asking for confirmation. It must also offer to export the current uncompressed state to a checkpoint file first, so you have a fallback restore point. After compression, the assistant must not imply that dropped context is recoverable. What is gone is gone, and the spec requires honesty about that.

In practice, the interaction looks something like this:

Assistant: Context saturation is approaching. Before compressing, I recommend exporting a checkpoint — this gives you a restore point if you need to recover dropped context later. Here is what will be retained: active files, open tasks, and the last three decisions. The following will be dropped: earlier code review comments and the initial scaffolding discussion. Do you want to export a checkpoint first, or proceed directly with compression?

You can read the full details of this workflow in the new section 4.5 of the AI Context Kit specification.

Simplifying Distribution of the kit

The process of setting up AI Context Kit was always something I wanted to be as simple as possible, but the reality is that it still required a bit of manual work to clone the repo, copy files, and set up your assistant’s configuration.

In the meantime, some better standards have emerged for distributing AI tools and skills, and I wanted to align with those to make it easier for developers to adopt the kit.

Claude Code Plugin

AI Context Kit ships a .claude-plugin/plugin.json manifest that makes the repository installable as a native Claude Code plugin. Once installed, all skills are registered as namespaced slash commands — no manual SKILL.md loading required.

1
2
3
4
5
6
7
8
# Register the marketplace (one-time)
claude plugin marketplace add MSiccDev/ai-context-kit

# Install
claude plugin install ai-context-kit@ai-context-kit

# Project-scoped install (shared via .claude/settings.json)
claude plugin install ai-context-kit@ai-context-kit --scope project

Inside a session, skills are invoked with their plugin namespace:

1
2
/ai-context-kit:create-usercontext-instructions
/ai-context-kit:create-checkpoint

GitHub Copilot CLI Plugin

Claude Code and GitHub Copilot CLI share the same plugin spec. The same .claude-plugin/ directory also contains a marketplace.json that makes the repo a self-hosted marketplace. The install commands are identical:

1
2
copilot plugin marketplace add MSiccDev/ai-context-kit
copilot plugin install ai-context-kit@ai-context-kit

OpenAI Codex Support

Codex uses a different discovery mechanism: it scans upward from the working directory for a .agents/skills/ folder. AI Context Kit now ships that directory with symlinks pointing to the canonical skills/ folders as needed for Codex discovery.

Each skill also has an agents/openai.yaml sidecar with the display name, short description, and default prompt that the Codex skill picker uses. If you install the kit, all skills should be discovered automatically.

Please note that these distribution methods are not mutually exclusive. You can choose to install the kit as a plugin in Claude Code, and at the same time have it available as a local skill set for OpenAI Codex. My goal with this update was to make all skills and features accessible with minimal setup, regardless of your preferred AI assistant.

Conclusion

With the introduction of cross-session persistence and context compression, AI Context Kit now has another layer of control and reliability. By combining the persistence with the compression feature, you can now have long-running sessions that can be stretched far longer than before without losing control over the context or risking silent data loss.

By simplifying the distribution and installation process, I hope to make it easier for developers to adopt the kit and integrate it into their workflows, regardless of their preferred AI assistant.

Have you tried my Context Kit already? What do you think about these new features? Do you have any suggestions for improvement or new features you would like to see? Let me know in the comments below or by opening an issue in the repository.

As always, I hope this post and the kit itself are useful for some of you.

Until the next post, happy coding, everyone!


Title image note: The title image of this post was generated with the help of AI. It visually represents AI Context Kit as structured infrastructure — a stable, secure instruction layer at the center of complex, multi‑model AI workflows.

Disclaimer: This blog post was written with the help of AI. I provided the structure and key points, reviewed the draft, and edited it to fit my style and technical standards.

This post is licensed under CC BY 4.0 by the author.