Feature Request: Session History Search
Problem
Copilot CLI stores session history in ~/.copilot/session-state/ as JSONL files, but there's no built-in way to search through past sessions. Users often need to:
- Find how they solved a similar problem before
- Resume a session from days/weeks ago by topic
- Review what they worked on (for reports, handovers)
- Search for specific commands or discussions
Currently, users must manually browse files or build custom tooling.
Proposed Solution
Add a copilot --search <keyword> or copilot search <keyword> command that:
- Searches session content - Both user messages and assistant responses
- Interactive selection - Like
copilot --resume picker but with search
- Resume integration - Select a result and resume that session directly
Example UX
# Search sessions
$ copilot search "docker compose"
# Interactive search (like --resume but with filtering)
$ copilot search --interactive
# Search only user messages
$ copilot search "kubernetes" --user-only
Why This Matters
- Knowledge reuse - Solutions discovered once shouldn't be lost
- Context recovery - Resume work after interruptions
- Productivity - Avoid re-solving the same problems
Current Workaround
I built a shell script using ripgrep + fzf that searches sessions in ~0.08s for 67MB of history. Happy to share if helpful for implementation reference.
Additional Context
- Session files are JSONL with
user.message and assistant.message types
- ripgrep handles the search extremely fast (no index needed for reasonable history sizes)
- Integration with existing
--resume flow would be ideal
Feature Request: Session History Search
Problem
Copilot CLI stores session history in
~/.copilot/session-state/as JSONL files, but there's no built-in way to search through past sessions. Users often need to:Currently, users must manually browse files or build custom tooling.
Proposed Solution
Add a
copilot --search <keyword>orcopilot search <keyword>command that:copilot --resumepicker but with searchExample UX
Why This Matters
Current Workaround
I built a shell script using ripgrep + fzf that searches sessions in ~0.08s for 67MB of history. Happy to share if helpful for implementation reference.
Additional Context
user.messageandassistant.messagetypes--resumeflow would be ideal