Repository navigation
Conversation
Agents can now search and read archived Claude Code and Codex sessions through two tools, search_sessions and read_session, over stdio. Both tools read only the redacted search projection. The new search::session_documents_page returns a session's redacted text in ingest order, so no flagged span, thinking block, tool payload, or cleartext title reaches the agent's model provider.
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.
Why
Agents should be able to look up earlier Claude Code and Codex work on this machine.
lorectl mcpserves the existing archive search to them as an MCP server over stdio.What changed
search_sessions(full-text search with the existing filters) andread_session(one session's text, paged).search::session_documents_pageinlore-corereads a session back from the redacted search projection.Scope
truncated.Tradeoffs
read_sessiondoesn't usequery::get_session, because that returns cleartext. Session titles are left out for the same reason.serde_jsondirectly instead of an MCP SDK, so the no-network dependency audit stays as it is.Blast Radius
A new command and one new read-only function. Existing commands and the desktop app are unchanged.
Verification
cargo test -p lorectl -p lore-corepasses on this commit alone, in a clean worktree. That includes new process tests over stdio, one of which checks that a planted token never appears in a reply.cargo clippy --workspace --all-targets --all-features -- -D warningsis clean.search_sessionsandread_sessionreturned results (counts checked, not content).