Add session log sanitizer for oversized image debugging#2
Open
WesleyMFrederick wants to merge 1 commit intodecodetool:mainfrom
Open
Add session log sanitizer for oversized image debugging#2WesleyMFrederick wants to merge 1 commit intodecodetool:mainfrom
WesleyMFrederick wants to merge 1 commit intodecodetool:mainfrom
Conversation
Addresses decodetool#1 by providing a tool to sanitize session logs for sharing. Replaces base64 image data with SHA-256 hashes while preserving structure, reducing file size by ~90% for image-heavy sessions. Usage: node scripts/hash-session-logs.cjs <session-file.jsonl> [output-dir] Features: - SHA-256 hashing of base64 image data - Preserves full JSON structure for debugging - Progress feedback and size reduction reporting - Error handling with line-level recovery
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.
Resolves #1
This utility helps users share session logs affected by the oversized image crash without exposing large base64 data.
Features
Usage
node scripts/hash-session-logs.cjs ~/.claude/projects/session.jsonlOutput is written to
.claude-session-logs/directory with.hashed.jsonlextension.Testing
Tested on real Claude Code session files with embedded screenshots from Decode whiteboard integration. Typical reduction: 50MB → 5MB.
Implementation Details