You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Paste images into built-in questions tool answer #24199
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).
Feature request: Paste to attach image #906: General feature request for paste-to-attach image support in the prompt input — related but targets the main chat input rather than the question tool specifically
If your request is distinct, please clarify how it differs.
Activity
github-actions commentedon 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 commentedon 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:
(e.g., a small thumbnail preview or icon next to the inserted path)
for easier debugging?
Happy to help test this on [your OS] if needed! 🚀
baltasarblanco commentedon Apr 24, 2026
Thanks for the links! 🙏
After reviewing #11026 and #906, I believe this proposal has a distinct focus:
That said, I'm happy to consolidate discussions if the maintainers prefer!
Just let me know what works best for the project. 😊
github-actions commentedon 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.