GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Image Clipboard Paste Not Working in OpenCode · Issue #10154 · anomalyco/opencode

Image Clipboard Paste Not Working in OpenCode #10154

New issue
Copy link
New issue
Copy link
Closed
Closed
Image Clipboard Paste Not Working in OpenCode#10154
Copy link
Assignees
rekram1-node
Labels
bugSomething isn't workingnix

Description

@ehab-oss
ehab-oss
opened on Jan 23, 2026
Issue body actions

Description

Problem Description

When attempting to paste images from clipboard into OpenCode TUI, the system fails to recognize/process the image input. The error message shows: "I cannot see the image. It appears there was an error reading from the clipboard, and this model does not support direct image input via that method."

However, the same models (Gemini Flash/Pro Preview) work perfectly with image input when tested through other tools (goose CLI via Ollama), confirming that the underlying models and Ollama infrastructure DO support image processing.

Environment Details

  • OpenCode Version: 1.1.25
  • Terminal: Alacritty 0.16.1
  • OS: Linux "nixos" (Wayland session)
  • Clipboard Tool: wl-copy (Wayland clipboard)
  • Provider: Ollama with cloud models as local models
  • Model Tested: gemini-3-flash-preview:latest and gemini-3-pro-preview:latest
  • Screenshots Location: ~/Pictures/Screenshots/ (contains PNG files)

Configuration

// ~/.config/opencode/opencode.json
{
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama",
      "options": {
        "baseURL": "http://localhost:11434/v1"
      },
      "models": {
        "gemini-3-flash-preview:latest": {
          "name": "Gemini 3 Flash Preview",
          "options": {
            "capabilities": {
              "input": ["text", "image"],
              "output": ["text"]
            }
          }
        },
        // ... other models configured similarly
      }
    }
  }
}

Things I tried to resolve this issue

  1. Added explicit capabilities: Configured "input": ["text", "image"] for vision-capable models
  2. Qwen3 VL model: Vision-specific model also doesn't work with clipboard paste
  3. File path reference via @ syntax: Attempted @Pictures/Screenshots/ reference method - also does not work

Findings

  1. Error suggests clipboard read failure, not model capability issue
  2. File path reference via @ syntax does not work for images, despite being attempted

Reproduction Steps

  1. Configure OpenCode with Ollama provider running cloud models as local models
  2. Copy any image to clipboard (e.g., screenshot)
  3. Paste into OpenCode TUI conversation
  4. Ask "Can you see [Image 1]?"
  5. Observe the error about clipboard read failure

Additional Testing Results

  1. @ file path syntax also fails: Attempted @Pictures/Screenshots/ and @2026-01-09_10-59-43.png references do not work

Additional Context

Tested with Goose CLI using same Ollama models - images work perfectly there, confirming the issue is with OpenCode's clipboard/image input handling, not with Ollama or the models themselves.

Plugins

No response

Screenshot and/or share link

Image Image Image

Operating System

nixos 'unstable'

Terminal

Alacritty

Activity

  1. ehab-oss
    added
    bugSomething isn't working
    on Jan 23, 2026
  2. github-actions
    assigned
    rekram1-node
    on Jan 23, 2026
  3. github-actions
    added
    nix
    on Jan 23, 2026
  4. github-actions commented on Jan 23, 2026

    @github-actions
    github-actionsBot
    on Jan 23, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • [BUG] Image paste fails only on Azure GPT-5.2-Codex (File not found / [Image 1] not processed) #9375: Image paste fails only on Azure GPT-5.2-Codex with similar symptoms (File not found error / [Image 1] not processed)
    • [BUG] Azure gpt-5.2-codex (vision-capable) is unable to read screenshots #10150: Azure gpt-5.2-codex (vision-capable) is unable to read screenshots - model only receives textual placeholder
    • pasting images doesn't work on konsole, linux #6331: pasting images doesn't work on konsole, linux - clipboard paste not working on specific terminal/OS
    • ubuntu 25.10 cant paste image on desktop app #9868: ubuntu 25.10 cant paste image on desktop app - possible Wayland-related clipboard issue
    • [FEATURE]:Clipboard image pasting not supported with GLM-4.7 model + ZAI MCP in OpenCode #7341: Clipboard image pasting not supported with GLM-4.7 model + ZAI MCP - clipboard paste issue with specific model/provider

    Feel free to ignore if none of these address your specific case.

  5. ehab-oss commented on Jan 25, 2026

    @ehab-oss
    ehab-oss
    on Jan 25, 2026
    Author
    More actions

    I'm aware of the 'ollama launch' command, though I haven't tested it so far.

  6. Raw1mage commented on Jan 26, 2026

    @Raw1mage
    Raw1mage
    on Jan 26, 2026
    More actions

    I was using Antigravity in windows, and connecting to the wsl environment for dev.

    In wsl terminal, when the opencode reads "ctrl-v", it obtains the clipboard image by powershell. So it is essential to make sure that the powershell path is configured in .bashrc before the opencode cli is exectued.

    PATH=$PATH:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:

    Reacted by Tanawat Panmongkol and Gizmo
  7. 372572571 commented on Feb 9, 2026

    @372572571
    372572571
    on Feb 9, 2026
    More actions

    look_at(file_path="/home/xx/bell-notification.png")
    You can only force it to look at the picture in this way

  8. github-actions commented on Apr 11, 2026

    @github-actions
    github-actionsBot
    on Apr 11, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

    Reacted by escapedcat and Tangles
  9. github-actions
    closed this as completedon Apr 11, 2026
  10. 0xAlcibiades commented on Apr 21, 2026

    @0xAlcibiades
    0xAlcibiades
    on Apr 21, 2026
    More actions

    This is still an issue.

    Reacted by escapedcat, Ivan, Nikita Voloshenko, Oleksandr Vanilchuk, Pavel Kirilin, Chinmay Kabi, Paul Zhang, Nick Chapman, David Vilaverde, Hesham Mohamed and 9 more
  11. aacassandra commented on May 2, 2026

    @aacassandra
    aacassandra
    on May 2, 2026
    More actions

    This is still an issue, but it's not a limitation of OpenCode — it's a terminal limitation.

    Terminal Compatibility

    ✅ Works:

    • VSCode integrated terminal (macOS, Windows, Linux)
    • Windows Command Prompt
    • Windows Git Bash

    ❌ Doesn't work:

    • macOS Terminal.app
    • iTerm2
    • Most standalone terminals on macOS

    Workaround for macOS Terminal Users

    If you're using a standalone terminal on macOS, you can use this workaround:

    1. Install pngpaste

    brew install pngpaste

    2. Add helper function to your shell config

    For zsh (default on macOS), add to ~/.zshrc:

    cat >> ~/.zshrc << 'EOF'
    
    # Helper to paste images from clipboard
    clipimg() {
        local timestamp=$(date +%Y%m%d_%H%M%S)
        local filename="/tmp/clipboard_${timestamp}.png"
        
        if pngpaste "$filename" 2>/dev/null; then
            echo "$filename"
            echo -n "$filename" | pbcopy
            echo "✅ Image saved and path copied to clipboard!"
        else
            echo "❌ No image in clipboard"
            return 1
        fi
    }
    
    EOF

    For bash, use ~/.bashrc instead.

    3. Reload your shell config

    source ~/.zshrc  # or source ~/.bashrc for bash

    4. Usage

    1. Copy an image to clipboard (screenshot or copy from browser)
    2. Run clipimg in terminal
    3. The file path is automatically copied to clipboard
    4. Paste (Cmd+V) into OpenCode prompt

    Recommended Solution

    For the best experience on macOS, use VSCode's integrated terminal — it has native clipboard image support and works perfectly with OpenCode.

    Reacted by Mohammad Ghazanfar Ali Danish
    Reacted by Byron Bowerman
  12. 0xAlcibiades commented on May 2, 2026

    @0xAlcibiades
    0xAlcibiades
    on May 2, 2026
    More actions

    I was using Alacritty which falls under "standalone terminal" but this sort of thing works fine in claude code in the same. What I'm seeing is that it's getting an internal error even though opencode shows "Image" in the input box. Exactly the error above. I don't think "use vscode" is a valid solution to the issue here.

    Reacted by Vincenzo Simeone and Manuel Fragner
  13. guiorioli commented on May 14, 2026

    @guiorioli
    guiorioli
    on May 14, 2026
    More actions

    Running ollama launch opencode with kimi-k2.6 here. Same paste I can do on ollama launch claude without problems, fails on opencode.

    Image
  14. MfCrizz commented on May 15, 2026

    @MfCrizz
    MfCrizz
    on May 15, 2026
    More actions

    Same for me. Opencode 1.14.35 with llama-cpp and qwen 3.6 27B

  15. guiorioli commented on May 15, 2026

    @guiorioli
    guiorioli
    on May 15, 2026
    More actions

    Ok, I figured out, I had to add 'modalities' 'input' 'image' to my model in opencode.json
    "modalities": {
    "input": [
    "text",
    "image"
    ],
    "output": [
    "text"
    ]
    }

    Reacted by Juan Ramos, SinnySupernova, keejoe, RUAN Chi Fung and Echo
    Reacted by Tangles
  16. MfCrizz commented on May 16, 2026

    @MfCrizz
    MfCrizz
    on May 16, 2026
    More actions

    Can confirm this, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

bugSomething isn't workingnix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.