Use Search docs on any documentation page to find instructions across all
guides, headings, code examples, and tables. Open it with Cmd+K on macOS or
Ctrl+K elsewhere. For example, search remote control and open the guide or
a matching section. Arrow keys move through results, Enter opens a link, and
Escape closes search. Documentation search does not require a Hub login.
To find a decision or solution in saved agent conversations, use the Hub’s
search page, agit search, or the MCP search tool.
Those searches require sign-in and only include hosted history you can read.
Save and push local work before expecting it in hosted results.
Find a previous solution
agit login
agit search "rate limit retry"
agit search "rate limit" --repo alice/my-project
agit search "retry" --runtime codex --in reply
Replace the repository with one you can read. Search a phrase by retaining its double quotes inside the shell’s quoted query:
agit search '"connection refused" -deprecated'
Open a hit’s session and relevant turn before reusing its answer. A summary hit is secondhand context; an inferred outcome is not proof that a solution worked.
Narrow the content and repository
| Filter | Meaning |
|---|---|
--repo owner/name | One repository; equivalent to repo: or agent: in the query |
--owner name | Repository owner, including an organization |
--scope mine | Repositories in your personal namespace; excludes repositories merely shared with you |
--scope public | Public repositories visible through the authenticated search |
--scope owner/repo | An explicit repository |
--runtime codex | Conversations from a runtime |
--in prompt | Match prompts; also accepts reply, tool, output, edit, or summary and can be repeated |
--tool name | Tool-name substring |
--path fragment | File-edit path substring |
--type agents | Search repositories instead of default sessions; also accepts prs or people |
Scope supports sessions and agents. Session-only filters are not a substitute
for filters on other result types; inspect unknown for unsupported query
qualifiers. --local and --here are not supported by hosted search.
Filter saved authors and dates
agit search --repo alice/my-project --author alice@example.org \
--since 2026-09-01 --before 2026-10-01 --json
The query text is optional when you supply filters. These flags apply only to
session search. --author matches the selected saved version’s Git author name
or email exactly, ignoring case. This is recorded Git metadata, not verified Hub
identity or repository ownership.
Dates refer to the version’s Git committer time, not a matched transcript
event’s time. --since includes the boundary; --before excludes it. Date-only
values mean midnight UTC, and RFC3339 timestamps may include offsets. These
filters are separate flags: do not write author:, since:, or before: inside
the query. applied_filters reports the predicates actually applied.
Page through results and check completeness
agit search "retry" --repo alice/my-project --page 1 --limit 20 --json
agit search "retry" --repo alice/my-project --page 2 --limit 20 --json
Pages start at one. Use has_more to continue. --sort accepts best, recent,
or turns; --limit accepts 1 through 100. Narrow the repository or query when
a search is expensive.
Structured results include hits, total, has_more, incomplete, unknown,
and applied_filters. incomplete: true means the results and total are lower
bounds, including when a scan reached a limit or could not read metadata.
An empty incomplete result does not establish that nothing matched. Check
unknown before relying on a qualifier; requested author/date predicates must
not be silently relaxed.
--counts requests counts across result types. It cannot be combined with
--scope, --author, --since, or --before; use the filtered result’s total
instead.
Batch searches from an agent or script
agit search --query "cache failure" --query "build timeout" \
--repo alice/my-project --json
Shared flags apply to every query. Batch results retain input order and report success or failure independently. Any failed entry makes the command exit nonzero; successful entries remain available, so retry only failures. Up to 16 queries are accepted per batch.
With --json, read structured data from result.value. When search is piped or
redirected without that flag, it emits raw search JSON instead of the common CLI
envelope. Prefer an explicit --json for a consistent parser; see
automation output.