[JetBrains Plugin] Image attachments in chat fail — temp files deleted before agent can read them
Open 💬 0 comments Opened Jun 17, 2026 by wab4206
Environment
- Plugin: Claude Code [Beta] v0.1.14-beta
- IDE: IntelliJ IDEA 2026.1
- OS: macOS 15.x (Darwin)
Steps to reproduce
- Open a project in IntelliJ with the Claude Code plugin
- Start a chat with Claude
- Paste a screenshot into the chat input
- Ask Claude to read/describe the image
Expected behavior
Claude can see and analyze the pasted screenshot.
Actual behavior
Claude responds with "File does not exist" because the image is placed in a macOS temp directory (/var/folders/.../T/ai-chat-attachment-*.png) which gets cleaned up by the OS before the agent has a chance to read it.
Root cause
The plugin stores pasted image attachments in the system temp directory rather than a persistent location. macOS periodically cleans /var/folders/.../T/, and the file is gone by the time the Claude agent toolkit tries to access it.
Suggested fix
Copy image attachments to a persistent directory before passing the path to Claude, e.g. ~/.claude/attachments/ or the project's .claude/ directory, instead of using the system temp directory directly.