Repository navigation
History search takes a bot pattern to search every agent - #373
Merged
Merged
Conversation
A history call with query may now name bot as a GLOB (* ? [...]; no name holds those): it walks each matching bot's lineage, meeting a node an earlier walk has as the rest of a shared history, so a fork's prefix is searched once under the older bot, and lists matches newest turn ID first with each one's bot and turn handle. before and next_before are turn IDs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4064689dd5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Collecting every matched bot's whole lineage before searching held memory that grew with the store, and a fork's own nodes past an older fork's cut were credited to the older fork, whose handle cannot read them. The walks now run as cursors merged by node ID: a shared node comes up in each walk that has it and is searched once, under the oldest such bot; a node only one walk has is that bot's. Only each walk's place and the matches are kept, the search stops at its match and byte bounds, and next_before is the node the merge stopped at. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
lydakis
pushed a commit
that referenced
this pull request
Oct 29, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
This was referenced Oct 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
historytool's search (query) can now take a GLOB asbot(*,proj.*,[ab]) to search every agent the pattern matches at once. Bot names can't contain*,?or[, so a pattern is never mistaken for a name. This is the first of the two Delta-inspired pieces George picked; the second, forking a task with its files, follows in another PR.botand its turnhandle(turn:BOT/ID), so the agent can read that turn withhistory.next_beforemarks where the merge stopped, and passing it back asbeforecontinues from there.There's no new op, table, CLI verb or migration. The single-bot path is untouched.
Daemon cost
This runs on a storage thread through
store.read, never on the runtime thread, and never on a turn's path, since it's a tool call. Each walk is a SQL cursor that reads only node IDs and sizes. Memory is one cursor per matched bot plus at most 20 matches, and stays flat however long the histories are. There are no store writes. A continuation walks down from each head tobefore, the same way the single-bot search does.Tests
history_search_of_a_pattern_searches_every_bot_it_matches_newest_firstchecks the order across bots, that a fork's shared turn is listed once under its source, that bots outside the pattern are left out, that the running turn is skipped, and the empty-pattern and empty-query cases.history_search_of_a_pattern_credits_a_fork_with_what_only_it_hascovers Codex's case: two forks cut the same turn at different points, and the source is outside the pattern.history_search_of_a_pattern_goes_on_from_where_it_had_enoughchecks the 20-match stop and continuing withnext_before.cargo test -p agent-runtimepasses locally, and clippy and fmt are clean.🤖 Generated with Claude Code