Blackbird

Flight Manual · 05

Managing context

Long conversations get heavy. Blackbird lets you—and the model—trim what goes on the wire without throwing anything away.

The conversation lives in your session on your machine. Each request sends the provider the current view and does not ask the provider to store it for you. That view is a sequence of numbered blocks: instructions, exchanges with the model and its tools, and notes.

Operations on blocks

OperationEffect
SummarizeSwaps a run of blocks for one short note. The originals move to the archive intact.
DropRemoves blocks from the live view and moves them to the archive.
RestoreBrings archived blocks back into the live view byte-for-byte as they were.
Pin / UnpinProtects a block from being dropped or summarized; unpin lets it go again.

Drop and summarize always leave instructions, pinned blocks, and unfinished tool calls untouched.

Cache-aware timing: A drop or summary normally waits while the provider's prompt cache is warm, then lands when the cache goes cold, when you switch providers, when context overflows, or at the end of the turn. Pass "apply": "now" to apply it before the next request.

A summary is only text somebody wrote—usually the model—and nothing checks that it kept what mattered. That is why the originals stay archived on disk. If a summary lost a detail, restore the block.

Model & Lua access

Model tools

The model gets three built-in tools: context_list shows blocks with IDs, sizes, and previews; context_compact summarizes, drops, restores, pins, and unpins; context_read reads a block's original content up to 65,536 bytes at a time.

Turn program API

Lua workflows call the exact same operations through blackbird.blocks(), blackbird.compact(args), blackbird.read_block(id), and blackbird.pin(ids)—so you can script custom compaction rules per turn.

Manual commands

CommandWhat it does
/contextLists live blocks. In plain mode, prints JSON.
/originalsLists both live and archived blocks.
/inspect {"id": 12}Shows a block's original archived or live content.
/compact JSONRuns the same compaction operation as the model tool.
/restore IDBrings back one archived block by ID.
/statsShows exact context byte size and provider-reported token usage.
TUI · Compaction examples
/compact {"op": "drop", "ids": [12, 13]}
/compact {"op": "summarize", "from": 4, "to": 9, "summary": "Settled wire format and migrated tests."}

Context workbench

Inside the conversation view, /workbench opens a split pane with blocks on the left and the selected block's contents on the right.

KeyAction
F6Pin or unpin the selected block
F7Drop or restore the selected block
F8Apply waiting compaction changes immediately
F9Show or hide archived blocks
Ctrl-Left / Ctrl-RightPage through the selected block's content

Sizes are always reported in bytes. Blackbird never guesses at token counts—the only token figures you see come directly from the provider.