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.

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.
--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.