Skip to content

fix: use terminal paste command for image paths#5

Open
mybarman wants to merge 1 commit intodkodr:mainfrom
mybarman:codex/terminal-paste-fix
Open

fix: use terminal paste command for image paths#5
mybarman wants to merge 1 commit intodkodr:mainfrom
mybarman:codex/terminal-paste-fix

Conversation

@mybarman
Copy link
Copy Markdown

@mybarman mybarman commented Apr 10, 2026

Why?

VS Code 1.110+ appears to have regressed terminal insertion for Claude/Codex TUIs in remote sessions. The image upload still succeeds, but Terminal.sendText no longer reliably injects the generated remote path into the TUI input.

How?

Route terminal insertion through VS Code's terminal paste command instead of relying on direct sendText, and keep a fallback that leaves the path on the clipboard if programmatic insertion still fails.

Implementation details

This change adds a shared terminal insertion helper so both command paths use workbench.action.terminal.paste before falling back. The fix was verified against the reported macOS + remote session repro and also compiles cleanly.

AI-assisted by Codex.

Prefer VS Code's terminal paste command over direct sendText so uploaded image paths reach Claude/Codex TUIs again in remote sessions.

AI-assisted by Codex.

Co-Authored-By: Codex <codex@openai.com>
@mybarman mybarman force-pushed the codex/terminal-paste-fix branch from c7b2921 to aab76c4 Compare April 10, 2026 06:06
@mybarman
Copy link
Copy Markdown
Author

@dkodr can you review this please?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant