Skip to content

runbooks / command

Delete a context

Removes a context from the registry and its runbooks, and marks the runbooks where a role's actions changed for review

❯ /runbooks:contexts:delete <name> [--model <model>]

Removes the context from <paths.runbooks>/roles.json and its cases from the runbooks. Each role's map on a key of the context becomes a list. Marks the runbooks where a role's actions changed with review. Read first: ${RUNBOOKS_PLUGIN_ROOT}/skills/runbooks/references/config.md, "Roles", and ${RUNBOOKS_PLUGIN_ROOT}/skills/runbooks/references/format.md, "Review". Commit policy: ${RUNBOOKS_PLUGIN_ROOT}/skills/runbooks/references/commits.md.

Parameters

For each role with actions per case on the context's keys, it asks which case's actions the role keeps. Then it removes the cases from the runbooks and marks for review the runbooks where a role's actions changed.

Parameter What it does
<name> The context to delete. Without it, the command lists the contexts and asks.
--model <m> Run this invocation on one model: inline (in the main session), haiku, sonnet, opus or fable. Any value but inline runs the command in a sub-agent on that model. Without it, the command takes its row of the models table in the config: by default contexts:delete runs inline. On Codex, the values are inline, inherit (a sub-agent on the session's model) or a model ID the session supports, and the table is codex.models, where every row that is not inline defaults to inherit. See models.
/runbooks:contexts:delete client-access                 # remove a context everywhere
/runbooks:contexts:delete client-access --model sonnet  # in a sonnet sub-agent

View source on GitHub