GeezerVison is showing github.com — [FEATURE]: Paste images into built-in `questions` tool answer · Issue #24199 · anomalyco/opencode
[FEATURE]: Paste images into built-in questions tool answer #24199DescriptionFeature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Summary
When an agent calls the built-in question / ask-user tool and the user replies, let the user paste an image from the clipboard into the answer box. The tool should persist the pasted image to a temp file and return its absolute path as part of the user's answer, so the agent can immediately consume it (e.g. re-read with its Read tool, pass to vision, attach to a follow-up message).
Motivation
Agents frequently need to collect visual context mid-run — screenshots of bugs, design mocks, stack-trace pictures, diagrams. Today the only way to get an image to the agent during a question reply is:
- Save the clipboard image to disk manually
- Paste/type the absolute path as text
This breaks flow and is error-prone (wrong path, forgotten save step). Interactive MCP desktop apps (e.g. interactive-mcp-server's QuestionDock) already solve this by intercepting paste, saving clipboard bytes to a temp location, and inlining the absolute path into the answer. The built-in tool should match that UX.
Proposed behavior
- While typing an answer to a
question prompt, pressing paste (⌘V / Ctrl+V) with an image on the clipboard:
- Writes the image bytes to a temp file (e.g.
$TMPDIR/opencode-clipboard-<timestamp>.<ext>).
- Inserts the absolute path as text at the caret, optionally wrapped (e.g.
file:///... or plain path).
- Returns that path in the tool response
answer field alongside any other text the user typed.
- Supported formats: PNG, JPEG, WebP, GIF (at minimum PNG — the common clipboard format).
- No change when clipboard contains plain text.
- Multiple images in one answer should each produce their own absolute path.
Why the path (not base64)
- Agent's existing Read / vision tools already take paths.
- Keeps the
question response small.
- Matches how screenshots, file-drag, and
@file mentions already work.
Prior art
- GitHub/Slack/Discord clipboard-image-paste flows.
Acceptance criteria
- User can paste an image while answering a
question prompt.
- Image is saved to a temp file; absolute path returned to agent in the answer.
- Plain-text paste still works unchanged.
- Works on macOS, Linux, Windows.
- Temp files are cleaned up per OS temp-dir policy (no long-lived growth).
Reacted by baltasarblanco and Sahil Jassal Activityadded coreAnything pertaining to core functionality of the application (opencode server stuff) on Apr 24, 2026github-actions commented on Apr 24, 2026 This issue might be a duplicate of existing issues. Please check:
If your request is distinct, please clarify how it differs. baltasarblanco commented on Apr 24, 2026 Hi team! 👋
This is a fantastic UX improvement idea. As someone who frequently shares
screenshots during debugging sessions, this would save so much friction.
A couple of small suggestions that might complement the proposal:
- 🎨 Consider adding a subtle visual indicator when an image is pasted
(e.g., a small thumbnail preview or icon next to the inserted path)
- ♿ Ensure keyboard-only users can still trigger this flow without mouse
- 🧹 Maybe add a config option to customize the temp file naming pattern
for easier debugging?
Happy to help test this on [your OS] if needed! 🚀 baltasarblanco commented on Apr 24, 2026 Thanks for the links! 🙏
After reviewing #11026 and #906, I believe this proposal has a distinct focus:
- It targets the ask-user/question tool specifically (not general chat or generic file references)
- It emphasizes clipboard-image → temp file → absolute path as an atomic flow
- The goal is to let agents consume visual context mid-run without breaking user flow
That said, I'm happy to consolidate discussions if the maintainers prefer!
Just let me know what works best for the project. 😊 removed discussionUsed for feature requests, proposals, ideas, etc. Open discussion coreAnything pertaining to core functionality of the application (opencode server stuff) on May 3, 2026github-actions commented on Jul 5, 2026 To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|