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]: Integrated Manual File Editing via VS Code native diff editor #9370
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Note: This builds upon and resolves the needs mentioned in #2167 and expands the discussion in #8003 by providing a full edit-and-sync implementation.
Problem
Currently, OpenCode handles file diffs exclusively within the TUI. While this is efficient for quick approvals, it lacks the flexibility for granular manual adjustments before committing a change. Users often need to make small corrections to the AI's output, a workflow that is currently cumbersome as it requires accepting the change first and then editing the file manually in a separate step.
Proposed Solution
I propose an integration that leverages the VS Code native diff editor when OpenCode is running in an integrated terminal. This provides a seamless "edit-and-approve" loop.
Key features of the implementation:
Automatic Environment Detection: Recognition of VS Code via TERM_PROGRAM to toggle between TUI and IDE modes without manual configuration.
Interactive Native Editing: 'edit' permission requests open a native VS Code diff tab, allowing users to modify the proposed changes directly in the IDE buffer.
Stateful Synchronization: Real-time IDE connection tracking via SSE with robust reconnection logic to ensure the CLI and IDE stay in sync across terminal restarts.
TUI Feedback: A minimalist UI state in the terminal (connection indicator + animated status) to provide clear feedback when the editor has focus.
Reliability: Integrated line-ending normalization to ensure consistent file writes from external IDE buffers.
Verification Performed
Validated with a full production build using Bun 1.3.5 (standalone binary test).
Verified SSE stability through server restarts and IDE reconnections.
Full type-safety check passed with turbo typecheck.
I have a functional prototype ready. I would like to open a PR for design review to ensure this aligns with the project's roadmap.
Reacted by S-Luiten, Sehwan Park, Vitaly Zaslavsky, SvenMind, Will Mruzek, wwnbb, benheberlein, kefasjw, Sebastian Studniczek, 0x3d and 21 more
This is a highly useful feature that allows you to avoid vibe coding and instead use the agentic engineering approach.
That's the only thing stopping me from migrating from Cline/Kilocode.
Reacted by Muhammed İkbal Akpaça, Dimas Cyriaco, Srinadh, kris, mikekilic-fs, Akhmad Aakhif Athallah and Thas-Tayapongsak
Activity
github-actions commentedon Jan 19, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
HoangP8 commentedon Jan 30, 2026
You may take a look at this: https://github.com/HoangP8/opencode-plugin-editor-diff
View changed files directly in your editor — from the TUI. Try it out!
bibendi commentedon Mar 7, 2026
This is a highly useful feature that allows you to avoid vibe coding and instead use the agentic engineering approach.
That's the only thing stopping me from migrating from Cline/Kilocode.
github-actions commentedon Jul 6, 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.