Skip to content

Documentation

How do SolveLang context packs work?

What a context pack is, how to build one with the local MCP server's Solve Context tools, how every excerpt stays pinned to its source, and how to hand a pack to an agent — plus what packs deliberately do not claim.

A context pack is a bounded, exact selection of repository context for one task: the files and excerpts an agent needs, each one pinned to the source it came from, built deterministically on your own machine by Solve Context through the local MCP server.

The point is control: instead of an agent wandering a repository, or a retrieval system guessing, the pack states exactly what context a task gets — and can prove where every piece came from.

What a pack contains

Exact excerpts with provenance: every excerpt records its source, and graph excerpts are hash-pinned — the pack carries the source hashes, so a reader can verify an excerpt against the file it came from.

A byte budget: packs are built to a bounded size, so the context a task receives is a deliberate choice, not whatever happened to fit.

Determinism: the same inputs produce the same pack. Selection is a deterministic process over your workspace, not a model's guess.

Build a pack

The wider Solve Context family also includes solvelang_context_capabilities (what the installed version offers), solvelang_context_handoff and solvelang_context_handoff_validate (moving work between agents), and solvelang_context_compact_structured with solvelang_context_expand_rle (lossless compaction, covered below).

  1. Set up the local MCP server (the local setup guide) — packs are a local-server feature; the remote endpoint has no workspace and cannot build them.
  2. Call solvelang_context_plan to plan the context for your task.
  3. Call solvelang_context_pack to build the pack from that plan.
  4. Read pieces back with solvelang_context_retrieve — and note that retrieval rejects stale context: if the source changed after the pack was built, retrieval refuses rather than serving you yesterday's code.

Use a pack with an agent

Give the pack to the agent as the starting context for the task, together with the task itself. The agent works from pinned excerpts instead of re-discovering the repository, and impact questions can be answered from the pack's graph excerpts with the Solve Graph tools.

Handing work over: handoff state is portable between Claude Code and Codex, so a task planned with one tool can be picked up by the other with the same pack and the same provenance.

Compaction without losing information

Structured context can be compacted with solvelang_context_compact_structured and expanded back with solvelang_context_expand_rle. The pair is correctness-first and lossless: expansion reproduces the original, so compaction is a transport choice, never an information loss.

Honest limits

  • Selection is deterministic and lexical over the files the workspace walk can see. There are no embeddings and no persistent index behind a pack: a pack is built when you ask, from the tree as it stands.
  • Workspace reading is bounded by a 2 MB per-file safety cap: files over the cap are excluded from pack candidates and listed as skipped, and likely sensitive paths are denied by the context runtime policy.
  • No token-savings claim is made for packs. The published context evaluations are synthetic or use pinned source snapshots, and public comparative claims stay disabled until the full real-agent acceptance matrix is complete.
  • Solve Context does not launch agents, call providers, or mutate repositories. It prepares context; your agent does the work.

Keep going