[BUG] Subagent search on ~/.claude causes multi-GB log bloat and /resume crash

Resolved 💬 7 comments Opened Jan 16, 2026 by w1tg Closed Mar 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Subagent grep/search hitting ~/.claude/ causes session logs to grow to 4+ GB. Each progress entry serializes full agent context (70-95 MB per line). /resume crashes with trace trap on these large logs.

What Should Happen?

  • ~/.claude/ should be excluded from search tools by default
  • Progress entries should store deltas, not full context snapshots
  • Large tool outputs should be truncated before logging
  • /resume should handle large logs gracefully

Error Messages/Logs

[1]    1568 trace trap  claude --dangerously-skip-permissions

Steps to Reproduce

  1. Start Claude Code session
  2. Launch Task subagent that searches broadly (e.g., grep -r "keyword" ~/.claude/)
  3. Search finds the keyword in Claude's own JSONL logs
  4. Observe ~/.claude/projects/<project>/*.jsonl growing to gigabytes
  5. Try /resume — crashes with trace trap

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.9

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Evidence from log analysis:

  • ~/.claude/projects/<project>/*.jsonl: 4.1 GB each
  • Single progress line: 70-95 MB
  • toolUseResult inside: ~22 MB (stdout from grep hitting Claude's own logs)
  • 115 progress entries × ~35MB avg = 4 GB total

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗