Feature Request: Display full absolute paths in compacting summary instead of relative paths

Resolved 💬 3 comments Opened Dec 4, 2025 by nikkundra Closed Dec 4, 2025

Summary

When Claude Code compacts a conversation, the summary displays file paths as relative paths from the current working directory (e.g., ../../../../../.zshrc). This can cause confusion and potential errors when resuming work, as the AI may not correctly identify which files were referenced.

Current Behavior

After compacting, the summary shows:

Referenced file ../../../../../.zshrc
Read README.md (205 lines)
Referenced file CLAUDE.md
Referenced file ../../SomeDocumentation.md
Referenced file ../other-project/GUIDE.md

Expected Behavior

The compacting summary should display full absolute paths:

Referenced file /Users/username/.zshrc
Read /Users/username/Projects/my-project/README.md (205 lines)
Referenced file /Users/username/Projects/my-project/CLAUDE.md
Referenced file /Users/username/Documents/SomeDocumentation.md
Referenced file /Users/username/Projects/other-project/GUIDE.md

Why This Matters

  1. Prevents duplicate file creation: When AI resumes after compacting, relative paths can be misinterpreted if the working directory changed, leading to files being created in wrong locations.
  1. Eliminates ambiguity: Multiple files can have the same name (e.g., CLAUDE.md, README.md) in different directories. Full paths make it clear which exact file was referenced.
  1. Maintains context accuracy: Users who instruct the AI to always use full absolute paths find that the compacting summary contradicts this requirement by showing relative paths.
  1. Audit trail: For debugging and reviewing session history, full paths provide unambiguous file references.

Use Case

Users who work with complex directory structures (synced cloud folders, deeply nested project trees, or folders with long descriptive names) need precise file identification after context compacting to avoid:

  • Creating duplicate folders/files in wrong locations
  • Editing the wrong file that happens to have the same filename
  • Losing track of which version of a file was referenced

Suggested Implementation

When generating the compacting summary, use the absolute path that was originally passed to the Read/Write/Edit tools rather than computing a relative path from the current working directory.

Environment

  • Claude Code version: 2.0.58
  • Client: Terminal.app
  • OS: macOS 26.2 (Build 25C5048a)
  • Architecture: arm64 (Apple Silicon M3 Max)

---

Thank you for considering this enhancement. It would significantly improve the reliability of long-running sessions that require multiple compacting cycles.

View original on GitHub ↗

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