Context awareness #2293

Open
opened 2026-02-16 17:35:00 -05:00 by yindo · 22 comments
Owner

Originally created by @ravshansbox on GitHub (Oct 27, 2025).

Originally assigned to: @fwang on GitHub.

Description

Opencode vscode extension page says that it features context awareness, but when I select lines from vscode and ask about them inside agent I see that agent does not "know" what is selected. Does it really support this feature? If it does how it should be used? Maybe needs some documentation updates

OpenCode version

0.15.18

Steps to reproduce

  1. Open vscode
  2. Install opencode extension
  3. Open opencode from the shortcut inside the ide
  4. Open any file and select some text
  5. Try to refer to it inside opencode prompt

Screenshot and/or share link

No response

Operating System

macOS 26.0.1

Terminal

VSCode terminal

Originally created by @ravshansbox on GitHub (Oct 27, 2025). Originally assigned to: @fwang on GitHub. ### Description Opencode vscode extension page says that it features context awareness, but when I select lines from vscode and ask about them inside agent I see that agent does not "know" what is selected. Does it really support this feature? If it does how it should be used? Maybe needs some documentation updates ### OpenCode version 0.15.18 ### Steps to reproduce 1. Open vscode 2. Install opencode extension 3. Open opencode from the shortcut inside the ide 4. Open any file and select some text 5. Try to refer to it inside opencode prompt ### Screenshot and/or share link _No response_ ### Operating System macOS 26.0.1 ### Terminal VSCode terminal
yindo added the bug label 2026-02-16 17:35:00 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 27, 2025):

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

  • #3393: vscode extension: Some extension keyboard shortcuts don't work (windows) - This issue also relates to VSCode extension functionality not working as expected, though it focuses on keyboard shortcuts rather than context awareness

Feel free to ignore if none of these address your specific case about context awareness and text selection.

@github-actions[bot] commented on GitHub (Oct 27, 2025): This issue might be a duplicate of existing issues. Please check: - #3393: vscode extension: Some extension keyboard shortcuts don't work (windows) - This issue also relates to VSCode extension functionality not working as expected, though it focuses on keyboard shortcuts rather than context awareness Feel free to ignore if none of these address your specific case about context awareness and text selection.
Author
Owner

@rekram1-node commented on GitHub (Oct 27, 2025):

Ah I think you need to do cmd + option + k to send the selected text to the prompt box

@rekram1-node commented on GitHub (Oct 27, 2025): Ah I think you need to do `cmd + option + k` to send the selected text to the prompt box
Author
Owner

@ravshansbox commented on GitHub (Oct 28, 2025):

Can we make it automatic (explicit opt-in through settings maybe)? How about sending current open file(s)?

@ravshansbox commented on GitHub (Oct 28, 2025): Can we make it automatic (explicit opt-in through settings maybe)? How about sending current open file(s)?
Author
Owner

@ravshansbox commented on GitHub (Oct 28, 2025):

All popular agents (except zed) already do this by default without any config

@ravshansbox commented on GitHub (Oct 28, 2025): All popular agents (except zed) already do this by default without any config
Author
Owner

@rekram1-node commented on GitHub (Oct 28, 2025):

Yeah that should be fine, @fwang may have an opinion on it he was the one who built it

@rekram1-node commented on GitHub (Oct 28, 2025): Yeah that should be fine, @fwang may have an opinion on it he was the one who built it
Author
Owner

@ravshansbox commented on GitHub (Oct 29, 2025):

Ah I think you need to do cmd + option + k to send the selected text to the prompt box

This only works if I select and open opencode, if opencode is already open and I press these keybindings nothing happens really

@ravshansbox commented on GitHub (Oct 29, 2025): > Ah I think you need to do `cmd + option + k` to send the selected text to the prompt box This only works if I select and open opencode, if opencode is already open and I press these keybindings nothing happens really
Author
Owner

@deepfriedmind commented on GitHub (Nov 12, 2025):

Is this supposed to work, or is it just that the documentation is wrong?

Context Awareness: Automatically share your current selection or tab with OpenCode.

@deepfriedmind commented on GitHub (Nov 12, 2025): Is this supposed to work, or is it just that the documentation is wrong? > [Context Awareness: Automatically share your current selection or tab with OpenCode.](https://opencode.ai/docs/ide/)
Author
Owner

@rekram1-node commented on GitHub (Nov 13, 2025):

I think there is a case it isn't working we will fix

@rekram1-node commented on GitHub (Nov 13, 2025): I think there is a case it isn't working we will fix
Author
Owner

@ravshansbox commented on GitHub (Dec 3, 2025):

I wasn't following the repo lately, any updates on this?

@ravshansbox commented on GitHub (Dec 3, 2025): I wasn't following the repo lately, any updates on this?
Author
Owner

@rekram1-node commented on GitHub (Dec 3, 2025):

Vscode extension hasn't gotten enough love lately, but someone is workign on some updates

@rekram1-node commented on GitHub (Dec 3, 2025): Vscode extension hasn't gotten enough love lately, but someone is workign on some updates
Author
Owner

@cezarderevlean commented on GitHub (Dec 17, 2025):

Is it possible to also have this cmd+shift+k command to send the filepath to opencode opened in an external terminal? Like claude does

@cezarderevlean commented on GitHub (Dec 17, 2025): Is it possible to also have this cmd+shift+k command to send the filepath to opencode opened in an external terminal? Like claude does
Author
Owner

@junmediatek commented on GitHub (Dec 18, 2025):

Vscode extension hasn't gotten enough love lately, but someone is workign on some updates

@rekram1-node
Could you share when this issue is expected to be resolved?

@junmediatek commented on GitHub (Dec 18, 2025): > Vscode extension hasn't gotten enough love lately, but someone is workign on some updates @rekram1-node Could you share when this issue is expected to be resolved?
Author
Owner

@ravshansbox commented on GitHub (Dec 18, 2025):

I can see there is a beta version of the extension with a different package name, tried it but did not notice anything new

@ravshansbox commented on GitHub (Dec 18, 2025): I can see there is a beta version of the extension with a different package name, tried it but did not notice anything new
Author
Owner

@ravshansbox commented on GitHub (Dec 18, 2025):

Folks, this is a real blocker, any updates on this or even any plans?

@ravshansbox commented on GitHub (Dec 18, 2025): Folks, this is a real blocker, any updates on this or even any plans?
Author
Owner

@rekram1-node commented on GitHub (Dec 19, 2025):

There are plans to make it better still a WIP but it's going to be pretty overhauled

@rekram1-node commented on GitHub (Dec 19, 2025): There are plans to make it better still a WIP but it's going to be pretty overhauled
Author
Owner

@junmediatek commented on GitHub (Dec 30, 2025):

There are plans to make it better still a WIP but it's going to be pretty overhauled

Hi @rekram1-node
Merry Christmas. How about this issue? Is there anything update?

@junmediatek commented on GitHub (Dec 30, 2025): > There are plans to make it better still a WIP but it's going to be pretty overhauled Hi @rekram1-node Merry Christmas. How about this issue? Is there anything update?
Author
Owner

@ravshansbox commented on GitHub (Jan 10, 2026):

Any updates on this folks?

@ravshansbox commented on GitHub (Jan 10, 2026): Any updates on this folks?
Author
Owner

@nikolasgd commented on GitHub (Feb 1, 2026):

Also interested in this. Never got this to work properly. I have the opencode extension from sst installed in vs code. cmd + option + k doesnt work either.

@nikolasgd commented on GitHub (Feb 1, 2026): Also interested in this. Never got this to work properly. I have the opencode extension from sst installed in vs code. cmd + option + k doesnt work either.
Author
Owner

@ravshansbox commented on GitHub (Feb 2, 2026):

@nikolasgd it used to work when 1) I do not have installed claude code extension (keybinding conflict) 2) I run opencode from the extension button or press cmd+shift+esc (when I open vscode terminal and run opencode, the context sharing does not work)

@ravshansbox commented on GitHub (Feb 2, 2026): @nikolasgd it used to work when 1) I do not have installed claude code extension (keybinding conflict) 2) I run opencode from the extension button or press cmd+shift+esc (when I open vscode terminal and run opencode, the context sharing does not work)
Author
Owner

@nikolasgd commented on GitHub (Feb 2, 2026):

I don't have Claude Code installed and running from cmd + esc doesn't work either, unfortunately.

@nikolasgd commented on GitHub (Feb 2, 2026): I don't have Claude Code installed and running from cmd + esc doesn't work either, unfortunately.
Author
Owner

@ravshansbox commented on GitHub (Feb 2, 2026):

I don't have Claude Code installed and running from cmd + esc doesn't work either, unfortunately.

I think the keybinding is cmd + shift + esc, not cmd + esc

@ravshansbox commented on GitHub (Feb 2, 2026): > I don't have Claude Code installed and running from cmd + esc doesn't work either, unfortunately. I think the keybinding is cmd + shift + esc, not cmd + esc
Author
Owner

@nikolasgd commented on GitHub (Feb 2, 2026):

only difference is that shift opens opencode in a new tab.

@nikolasgd commented on GitHub (Feb 2, 2026): only difference is that shift opens opencode in a new tab.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2293