Feature: Auto-save large pasted text to a scratchpad file (like Copilot CLI)
What I'm trying to do
I frequently paste large blocks of text (logs, specs, data) into Claude Code. I'd like Claude Code to persist those pastes to a file on disk automatically and reference that file in the conversation, the way GitHub Copilot CLI does.
How Copilot CLI does it
When you paste a large block into Copilot CLI, it writes the content to a scratchpad file (e.g. ~/.copilot/scratchpads/) and inserts a reference to that file into the chat. The content is therefore:
- persisted to disk (survives the session)
- reusable and editable as a real file
- referenced by path rather than dumped inline
Current Claude Code behavior
Claude Code collapses large pastes into a [Pasted text #N +X lines] placeholder, but this is display-only — the content is kept in memory for the session and is not written to a file the user can reference later. There's no settings.json option to change this, and the UserPromptSubmit hook only receives the placeholder string, not the expanded paste content, so it can't be replicated with a hook either.
Request
An option to automatically persist large pastes to a configurable scratchpad directory and reference the file in chat. Ideally:
- a setting to enable/disable it
- a configurable scratchpad directory (default e.g.
~/.claude/scratchpads/) - a configurable line/character threshold for when a paste gets saved
This would make pasted content reusable, editable, and durable across sessions, and would give hooks/tooling a real file to work with instead of an opaque placeholder.