Recall tool results
Hansard exposes conversation and memory retrieval through MCP. Install the
managed integration with Recall in your agents,
or run hansard mcp serve in a compatible local client.
Retrieved text is historical evidence, not instructions. An agent should read the relevant source before relying on a search excerpt. Content an agent retrieves becomes part of that agent’s model context.
Search conversations
Section titled “Search conversations”search_past_sessions accepts the same task filters as hansard history:
| Filter | Meaning |
|---|---|
repo, provider |
Project or harness selection |
since, until |
Time range. Date-only values cover the specified day on the local clock. |
roles |
Message roles, such as ["user"] for authored requests |
tool, command, file, commit |
Recorded tool, command, edited path, or commit |
include_subagents, include_web_chats |
Include those conversation classes |
include_team_sessions, team |
Include conversations received through a Team, or only one Team’s. Without them, Team conversations stay out unless Show team conversations in Sessions, Stats, and Graph is on, as in hansard history. |
hits_per_session |
Up to five matching messages from one conversation |
group_revisions |
Group edited copies of a message within its conversation |
mode |
keyword, meaning, or hybrid |
With embeddings enabled, hybrid search combines keyword and meaning results.
The response names the mode that ran. mode_notice explains when meaning
search was skipped. Each hit carries matched_by and, when applicable, a
passage similarity.
Hits include the session identifier, title, provider, repository, message
index, matched role, excerpt, and score. started_at_local includes the local
UTC offset. The response reports when the index was built and whether indexing
is paused. A message covering all query terms is preferred over one covering
only some terms.
Additional matches from one conversation appear in more_hits. Grouped edits
carry revisions and latest_revision. They remain copies of one conversation’s
message, not independent evidence from several conversations.
Read a transcript window
Section titled “Read a transcript window”Use get_past_session with around set to a search hit’s message index.
roles filters the returned messages while preserving their transcript
indexes. The next cursor continues the filtered read. group_revisions
folds earlier near-copies into their latest revision within the window.
Tool output is capped at 1,500 characters by default. A partial message carries
truncated, content_chars, and content_offset. max_message_chars sets a
different per-message limit. For one long message, request its index with
around and limit: 1, then continue with content_offset when necessary.
That single-message read can use the full max_chars budget.
Each returned message includes timestamp_local with its UTC offset. Results
also include source links. Only partial messages carry offset and full-length
fields.
Read file history and task context
Section titled “Read file history and task context”code_history takes a file path relative to the agent’s working folder, or
path:line. A path returns the conversations that edited the file, newest
first, with commits, reverts, test failures and fixes, live sessions that
edited it, and the files that import it. A line returns the archived edit that
wrote it, as hansard why does. symbol narrows the history to one function,
class, or method in the file. work_context takes a session identifier and defaults to the calling
conversation. It returns the task’s conversations in order, recorded open,
done, and dropped steps, failing and fixed tests, commits, and linked
conversations with their evidence.
Both return a short tree and the same entries as structured data. Each entry
names a session_id and message_index to open with get_past_session, a
commit, or a project memory’s memory_id and line to open with
get_memory. token_budget caps the size of the whole result (4,000 by
default), and truncated reports omitted entries. repo selects another
repository, and until hides later evidence, except with path:line or
symbol, which read current code and refuse it. Both read only the current
repository’s conversations unless repo names another.
Search and read memories
Section titled “Search and read memories”search_memories searches current archived memories across providers.
A repo filter ranks project guidance with global and unkeyed records.
Additional provider and source filters narrow the result. Skills are excluded
from memory search.
Hits identify the memory kind, source, scope, title, and matching line range
when known. They omit empty fields and a duplicate matched_text copy of the
excerpt. hansard memory search --json retains the full CLI record.
Pass a hit’s lineStart as line to get_memory for a window centered there.
The result starts at a complete line and reports contentLineStart and
contentLineEnd. offset takes precedence over line. Continue at
nextOffset if the result is truncated.
These tools cannot edit, merge, or delete memories. --no-memories omits them
from a standalone MCP connection or managed integration. After changing an
integration, reload the agent to discover its current tools.
Errors
Section titled “Errors”A failed tool returns isError with an error object containing a stable
code, a message, and retryable. A retryable failure can succeed later.
Unknown tool names and malformed protocol calls remain JSON-RPC errors.
Every call answers within 120 seconds, and ask_session, ask_user, and
wait_agents within 30 minutes and 30 seconds. A call past its limit returns
tool_timeout with retryable: false, though work already under way may
still take effect.
Agent-reported subagent deliveries
Section titled “Agent-reported subagent deliveries”The separate capture_subagent_messages status tool records exact Codex native
assignments, follow-ups, and results received by an agent. It accepts the
message type, sender, recipient path, and original text, and returns a receipt
bound to the current session without repeating the text.
Managed Codex instructions ask the receiving agent to capture each new delivery before acting, without inherited history, quotations, or reconstructed text. Successful captures must not be repeated. This is agent-reported evidence, not an independent observation of the native delivery.
Capture requires the client to retain native McpToolCall arguments and
completion receipts. It does not decode earlier ciphertext, create a recovery
conversation, send messages, or invoke a model. hansard mcp serve --status
exposes it without enabling messaging or helper launches.