Loading video...

Video Failed to Load

Go Home

Best way to debug Claude Code sessions and inspect agent context. Just Run: npx claude-code-templates@latest --chats Browser interface with advanced search across all your sessions (name, ID, directory, dates, message content). Shows every tool call with exact JSON executed. Resume button lets you continue any session - efficient context...

32,861 views • 8 months ago •via X (Twitter)

0 Comments

No comments available

Comments from the original post will appear here

Related Videos

I got curious how compaction works as a PM, so I did some brain surgery on Claude Code: (Anthropic's been doing really interesting work on context editing - they showed Claude Opus playing Settlers of Catan for 75+ minutes in a single thread by constantly editing the context instead of starting fresh. When I saw that Claude Code has a compaction command with optional custom instructions, I wanted to understand what's actually happening.) Abhishek Katiyar and Aman Khan gave me the key tip: Claude Code stores all your conversation history as text files on your computer. Open a new directory and give Claude Code a task. Here's how to watch compaction happening: 1. Go to your user's root directory 2. Press Command+Shift+Period (Mac) to show hidden folders 3. Navigate to ~/.claude/projects/ 4. Find your project folder and use Cursor/VSCode to open it (there's a reason) 5. Install the JSONL Gazelle plugin (open source, thank you Gabor Cselle!) 6. Open the most recent JSONL file - each row is a message in your conversation 7. Run the compact command in Claude Code with custom instructions 8. Watch what happens in the file What I learned: When you compact, Claude Code doesn't just summarize and delete everything. It creates a "compact boundary" in the conversation file, writes a summary of what happened before, but keeps the full original conversation (!!!!) The new thread can still retrieve any details from before compaction if needed. That is so damn cool. Why this matters: What you're getting in Claude Code is similar to what Anthropic ships in their developer SDK - so inspecting your daily tools is how you build real product intuition. The best way to understand AI systems is to open them up and look inside. Everything is text files.

Tal Raviv

57,910 views • 6 months ago

THIS GUY AUDITED 926 CLAUDE CODE SESSIONS AND FOUND MOST OF THE TOKEN WASTE WAS ON HIS SIDE everyone is blaming anthropic for the limits, so he decided to actually look at the data 858 sessions, 18,903 turns, and $1,619 estimated spend across 33 days here's what he found: 1\ one default setting was burning 14,000 tokens per turn Claude Code loads the full JSON schema for every tool into context at session start. whether you use them or not. 20,000 tokens of tool definitions sitting there on every single turn. the fix: one line in your settings.json "ENABLE_TOOL_SEARCH": "true" context dropped from 45K to 20K instantly. across 858 sessions that one setting was wasting an estimated 264 million tokens 2\ cache expiry is the single biggest waste 54% of his turns came after a 5+ minute idle gap. every one of those turns re-processed the entire conversation at full price which caused a 10x cost jump you go grab coffee. come back 5 minutes later. type your next message. everything rebuilds from scratch. the context didn't change. you didn't change. the cache just expired. 12.3 million tokens wasted on idle gaps alone 3\ 42 skills loaded. 19 of them used twice or less across 858 sessions. every one of those skill schemas sat in context on every turn eating tokens for nothing. 4\ 1,122 redundant file reads where the same file was read 3+ times one session read the same file 33 times. he ALSO built a full token auditor dashboard that shows you exactly where your waste is coming from 19 charts, opens in your browser, free AND open source

Om Patel

298,141 views • 3 months ago

Anthropic just released a talk on building headless automation with Claude Code. Presented by Sid Bidasaria, Member of Technical Staff at Anthropic live at Code with Claude on May 22, 2025 in San Francisco. Here is what the talk covers. Headless mode lets you run Claude Code without a person actively typing prompts from inside an automated script. Instead of a live session, a script calls Claude with a pre-written instruction using the -p flag. This opens the door for Claude Code to become a piece of a much larger, automated process. In plain terms: Claude Code stops being a tool you use and starts being a service that runs on its own. What this unlocks: Scheduled tasks: Run Claude Code on a cron schedule without anyone at a keyboard. Fix linting errors across an entire codebase. Automatically. Overnight. CI/CD integration: Trigger Claude Code as a step in your build process. Open a PR. Claude reviews it, flags issues, and pushes fixes before a human ever looks at it. GitHub automation: A project manager comments "Claude fix this" on a GitHub issue. Claude reads the request, finds the code, writes the fix, and opens the PR. Multi-machine workflows: One orchestrator dispatches tasks to multiple Claude Code instances running in parallel across different repos simultaneously. When you combine headless mode, hooks, and GitHub Actions, development teams can automate tasks that usually eat up significant time freeing senior engineers to focus on architectural problems while Claude handles the repetitive ones. If you use Claude Code for anything beyond single sessions this talk is worth 20 minutes of your time.

Elias

14,028 views • 1 month ago