Managing context
The conversation the model sees is a working view built from data stored in your session, on your machine. Each request sends the current live view to the provider; Blackbird does not ask the provider to keep the conversation for it.
The view is a list of numbered blocks: instructions, exchanges with the model and its tools, and notes. You and the model can change which blocks are live without losing the original material.
Operations
- Summarize replaces a set of blocks with one summary note. The replaced blocks move to the archive.
- Archive (the
dropoperation) removes blocks from the live view and keeps them in the archive. - Restore brings archived blocks back from their stored originals.
- Pin and unpin protect a block from being archived or summarized, or lift that protection.
Archive and summarize skip instruction blocks, pinned blocks, and tool exchanges that are still open.
By default an archive or summary is queued while the provider's prompt cache is warm, and applied when the cache goes cold, when you switch provider, when the context overflows, or at the end of the turn. Passing "apply": "now" applies it before the next request instead.
A summary is text written by whoever proposes it, usually the model. Blackbird does not check that a summary kept the facts that matter. That is why the originals stay available: if a summary turns out to be too lossy, restore what you need.
The model manages its own context
The model has three tools for this, available like any other tool:
context_listlists live blocks, with IDs, kinds, sizes and short previews, and optionally the archived ones.context_compactsummarizes, archives, restores, pins or unpins blocks by ID or by an ID range.context_readreads the exact original content of a live or archived block, in pages of up to 65,536 bytes.
Turn programs can do the same from Lua with blackbird.blocks(), blackbird.compact(args), blackbird.read_block(id) and blackbird.pin(ids).
Inspecting and changing context yourself
/contextlists the live blocks with their IDs, kinds, pin flags, sizes and previews. In plain mode it prints JSON./originalslists the live and archived blocks./inspect JSONreads a block's exact original content, for example/inspect {"id": 12}./compact JSONruns the same operation as the model's tool, for example/compact {"op": "drop", "ids": [12, 13]}or/compact {"op": "summarize", "from": 4, "to": 9, "summary": "..."}./restore IDrestores one archived block./statsshows context size in bytes and the provider's reported token usage.
In the conversation view, /workbench opens an interactive context workbench. Blocks are listed on the left and the selected block's details on the right. F6 pins or unpins, F7 archives or restores, F8 applies pending changes now, and F9 shows or hides archived blocks. Ctrl-Left and Ctrl-Right page through a block's original content.
Sizes in these views are bytes. Blackbird doesn't estimate tokens; token counts come only from what the provider reports.