Skip to content

Conversation

@Fieldnote-Echo
Copy link

Summary

Claude Code creates internal "sidechain" sessions for context caching and warmup purposes. These sessions appear in Opcode's session list with names like "Warmup" or filenames starting with agent-, cluttering the UI with dozens of entries that aren't meaningful user sessions.

This PR filters out these internal sessions by:

  1. Filename check: Skip files starting with agent- (these are always sidechains)
  2. JSONL parsing: Check the first line for isSidechain: true field

Changes

  • Added is_sidechain field to JsonlEntry struct to parse the isSidechain JSON field
  • Added is_sidechain_session() helper function to detect sidechain sessions
  • Modified get_project_sessions() to skip sidechain sessions

Testing

  • Builds successfully with cargo check
  • No new clippy warnings
  • Tested with real session files containing isSidechain: true

Related Issues

Fixes #393 - Session Display Issue: 'Warming Up' Messages


🤖 Generated with Claude Code

Claude Code creates internal "sidechain" sessions for context caching
and warmup purposes. These appear in the session list with names like
"Warmup" or "agent-*" and clutter the UI.

This change filters out these internal sessions by:
1. Checking if the filename starts with "agent-"
2. Parsing the first JSONL line and checking for isSidechain: true

Fixes winfunc#393

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session Display Issue: 'Warming Up' Messages and Safe Metadata Architecture

1 participant