Skip to main content
Glama

Reopen a closed agent session so a waiting note reaches it — only after the human says yes

brain_reopen

Reopens a closed Claude Code or Codex session in a new visible terminal so its waiting note is handled sooner, asking the human first and only proceeding on yes.

Instructions

A note to a session that has CLOSED waits up to 7 days and is delivered only when that session is next used. When the human wants it handled sooner, call this: KLYPIX asks the HUMAN (an in-chat Reopen / Not now prompt where the app supports it, otherwise a native dialog) and, only on yes, reopens that Claude Code or Codex session in a new, visible terminal in its own folder with the host's resume command; the reopened session receives the waiting note(s) at its first action. Nothing opens without the human's answer, nothing runs headless, and only a session with a note waiting can be reopened. Do not call it again for the same session after the human chose "Not now" unless they bring it up. Machine-local.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startNotrue (default): the reopened session starts on the note right away. false: it opens and waits for the human to prompt it.
projectNoAbsolute project root containing brain.klypix. Defaults to this connection's project.
sessionYesThe session to reopen: its id, or a unique prefix of at least 8 characters, as shown in the queued-note reply, brain_sync peers, or brain_doctor. It must be a Claude Code or Codex session that is not running and has a note waiting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.93.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare openWorldHint/idempotentHint/destructiveHint; the description adds real behavioral context: the human must approve via an in-chat or native prompt, nothing opens without an answer, nothing runs headless, the session lands in a visible terminal in its own folder, and it is machine-local.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the default behavior (a waiting note persists up to 7 days) before the action, and every clause carries information. It is dense and the long parenthetical about the prompt mechanism is slightly heavy, but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a human-gated, no-output-schema tool it covers prerequisites, the approval flow, and the post-reopen outcome well. The only gap is what the caller gets back on success or failure (e.g., error when the session is running), which is not described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter (start, project, session) is already documented in the schema. The description reinforces the session constraint (must be stopped and have a waiting note) but adds no new syntax or format detail, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource: it reopens a specific closed Claude Code or Codex session in a new visible terminal via the host's resume command. It is clearly distinguishable from siblings like brain_note and brain_sync, which queue or route notes rather than revive a session.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use ('When the human wants it handled sooner, call this') and explicit when-not ('Do not call it again for the same session after the human chose "Not now" unless they bring it up'), plus the precondition that only a session with a waiting note can be reopened.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.