Vicem is a context compression and handoff suite for AI coding assistants, primarily addressing token quota exhaustion or context degradation caused by long coding sessions in tools such as Claude Code, Cursor, and Codex. Its core approach is not to use lossy LLM summarization, but rather to preserve exact code contracts through deterministic code skeletonization and on-demand rehydration.
Main capabilities include:
- Context compression: Through personalized PageRank and submodular context selection, combined with AST-based code skeletonization, it reduces the net effective tokens of an active session by 85.6%–92.4%. Skeletonization preserves all imports, types, and signatures, and annotates omitted function bodies with deterministic purity and side-effect labels (such as [pure] or [effects: fs-write, proc, net, state, fs-read, throws, async]); the original function bodies are indexed in .vicem/ledger.json.
- On-demand rehydration: The receiving agent can, through the MCP tool vicem_rehydrate, rehydrate AST code that has been verified with SHA-256 and had secrets redacted, with optional inclusion of called functions.
- Real-time output masking: Masks verbose Bash/Read tool output in real time during the PostToolUse phase.
- Session handoff: Generates a hardened .vicem/BATON.md handoff file within 3 seconds, supporting session transfer among Claude Code, Cursor, Codex CLI, Gemini CLI, Windsurf, Antigravity IDE, and Web AI.
- Zero dependencies and zero network: 0 npm dependencies, 0 network calls, suitable for offline or air-gapped environments.
Usage:
- Quick start: You can run the local handoff GUI with zero installation via npx, or transfer a handoff file immediately.
- As an agent skill and MCP server: Add a single line of configuration in ~/.cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json, or claude_desktop_config.json.
- Browser sandbox: You can directly open index.html in Chrome, Edge, Brave, or Safari to use the zero-install browser sandbox (subject to connect-src 'none' CSP enforced).
- CLI commands: supports node vicem.mjs gui to launch the local interface; node vicem.mjs codex --preview to preview without saving handoff artifacts or launching the app; node vicem.mjs codex --preview --json to output a structured preview; node vicem.mjs status --json and node vicem.mjs history --json to view recorded results; node vicem.mjs undo <handoff-id> to restore the instruction changes from that handoff (refuses to overwrite if the instructions have changed, and does not undo the agent's edits to source code).
- GUI flow: select a project and source session, review or edit the extracted handoff target, select the target agent and delivery action (open the app, open in terminal, or prepare handoff only), and review the exact .vicem/BATON.md summary before writing or launching. If automatic launch is unavailable, you can copy the saved BATON.md path, the shell continuation command, and the launch prompt from the recovery panel.
Use cases:
- When Claude Code reaches the 5-hour quota limit but the feature is not yet complete, and the session needs to be handed off to another agent to continue.
- When Cursor or Codex slows down after 150k tokens of context, and the context needs to be compressed to restore performance.
- When an active session needs to be migrated between multiple AI coding assistants while preserving exact code contracts and side-effect information.
- When using a browser sandbox for context compression and handoff in air-gapped or offline environments.
Limitations and caveats:
- Automatic launch and desktop integration remain in preview status on Windows, and desktop auto-launch on all operating systems is best-effort.
- Successful delivery does not confirm that the agent has read the context; receipt status is unconfirmed.
- Preview tokens are used only for consistency checks, not for authentication.
- The legacy --dry-run still writes handoff artifacts; use --preview for read-only previews.
- Automated tests and local macOS browser checks have been verified, but real agent launches on Windows/Linux and actual target-agent receipt have not been certified by these tests.
- If automatic launch fails, the handoff file is still saved, and you can continue manually using the copy commands, launch prompt, and file path provided by the GUI or CLI.
- The restore operation does not undo the agent's edits to source code.
- Specific fees, prices, platform support details, etc. are not provided in the materials.