Uh oh!
There was an error while loading. Please reload this page.
feat: BROWSER interrupt - #10997
Conversation
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
The following comment was made by an LLM, it may be inaccurate: Based on my search results, I found one potentially related PR: Related PR:
The current PR #10997 is a sketch/discussion PR proposing the |
f1ae801 to
08fa7f7CompareClosing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
What does this PR do?
I'm mainly opening this PR to discuss the approach and spark debate, not with intent to merge it. So take it as a sketch!
Some CLI tools turn interactive, like Git opening a text editor, or Vite opening a browser.
Coding Agent implementations currently struggle with detecting this interactiveness.
&, making it hard to prevent process leaksis_backgroundtool param that decides a priori whether a tool call is in the background or not, which means it only works through knowledge of popular tools or mentions in the contextI have a hunch that we should implement the convention of the
EDITORenvironment variable. When Git needs to open an interactive editor, it spawns the binary inEDITORand waits until completion. Vite does the same with theBROWSERenvironment variable.These env variables are hooks for interactiveness, and Coding Agents can inject themselves to perform the interaction like a user would.
This PR sketches how that could work for
BROWSER. If a command callsBROWSER, opencode yields back control to the model and asks it to handle the interaction.As mentioned, at this point I'd love to hear your thoughts on the approach. Thanks!
How did you verify your code works?
Manual testing, not meant to be merged.