Skip to content

Search and recall

Hansard search is the direct path to a known conversation or topic. It searches the normalized archive and can narrow results with structured metadata.

Open Conversations and select the search icon beside the conversation count. Enter a distinctive phrase from the request, response, or tool output; the result list replaces the ordinary recent-session tree while the query is active. Select a result to open its transcript, tool calls, files, commits, and recorded provenance in the conversation pane.

For a broad archive, open Filter & sort beside the search icon. Source limits the originating harness, Model limits recorded model IDs, Time sets a recent window, Include controls agent, SDK, and web conversations, and Folder narrows the project path. These filters combine with the search text. Use Reset filters when an expected conversation is absent before concluding that it was never imported.

The archive search and the transcript finder have different scopes. The sidebar search finds conversations across Hansard; after opening one result, the conversation’s find control searches only that transcript. The terminal commands below expose the same archive for scripts and agent integrations.

Run history without a query to list recent archived sessions:

Terminal window
hansard history

The same archive is available through the Conversations view in hansard app or hansard web.

Pass a phrase and an optional time window:

Terminal window
hansard history "authentication migration" --since 90d --limit 10

Search terms do not need to reproduce a title exactly. Use selective terms that are likely to appear in the prompt, response, or canonical tool events.

Filters can be used independently or combined:

Terminal window
hansard history --repo github.com/acme/widgets --provider codex-cli
hansard history "cache invalidation" --tool apply_patch
hansard history --command "git commit" --since 30d
Option Purpose
--repo <repo-or-path> Match a repository, archive scope, working directory, or displayed path.
--provider <provider-or-alias> Match a provider or source alias such as codex-cli.
--tool <name> Match the normalized tool name recorded for a session.
--command <head> Match a parsed shell command head such as git commit.
--since <window> Limit results to a date window such as 30d or 90d.
--limit <count> Cap the number of returned sessions.
--include-subagents Include linked child/subagent runs hidden from the default conversation list.
--no-web-chats Exclude non-repository web-chat imports.
--json Return machine-readable results.

Full conversation output can exceed an agent harness limit. Start with a bounded latest window:

Terminal window
hansard show <session-id> --json --msg-limit 20

For continuation work, also read the beginning of the conversation to recover the original objective and constraints:

Terminal window
hansard show <session-id> --json --msg-offset 0 --msg-limit 8

When --msg-offset is omitted from a windowed JSON request, Hansard returns the latest messages. Windowed output omits the full Markdown and event copies and bounds large tool output while retaining tool-call arguments.

Normal search uses the canonical archive index. --markdown-fallback is a recovery option for legacy archives that are missing canonical events; it is not the normal search mode. A search miss means that no match was found in the selected archive coverage, not that the event could never have happened.