| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hey! Your PR title Fix run --attach agent validation and forward cwd doesn't follow conventional commit format. Please update it to start with one of:
Where scope is the package name (e.g., app, desktop, opencode). See CONTRIBUTING.md for details. |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: Potential duplicate found:
The searches show that PR #8154 is the most closely related PR. You may want to review whether #8154 was closed/reverted and why this new PR is needed, or if they're addressing the same underlying issues from different angles. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
I made a PR for allowing --dir with opencode run, in my PR dir is assumed local if not used with attach, and passed as it is to server if attach is being used You shouldn't assume dir is process.cwd() when attaching to a server, in my case if I run attach to my linux box from my mac and it passes my mac cwd to linux server, that would cause problems |
Sorry, something went wrong.
This is a fix following the feedback anomalyco#11812 (comment)
|
Thanks @BlankParticle ! I reverted the "offending" line back to the original. I will take a look at your PR. It sounds very useful! Let me know if there is anything else to be fixed. |
Sorry, something went wrong.
|
any update this for being merged? would be super helpful for my tmux workflow when using my VPS |
Sorry, something went wrong.
Unfortunately there was no real feedback so far. It would be great if a maintainer could give some feedback if more work is needed. |
Sorry, something went wrong.
…ntext found for instance`
|
@adamdotdevin @Hona — gentle ping. I've added the required Fixes #... links to the PR description. This is a bug fix for a crash on run --attach --agent. The cwd concern raised by @BlankParticle has also been resolved. I would appreciate feedback when you have a moment. Glad to invest more time, and polish it along your indications. |
Sorry, something went wrong.
|
I will look tomorrow |
Sorry, something went wrong.
|
Any updates here? This is the last step needed for my tmux-powered orchestrator to operate correctly. |
Sorry, something went wrong.
same here, super useful with tmux |
Sorry, something went wrong.
|
merged - thanks friends |
Sorry, something went wrong.
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Update (02/08): I edited the PR description following #11812 (comment). The new fix intentionally does not forward the client cwd when attaching, since the client and server may be on different machines/filesystems. The crash is fixed by validating --agent against the attached server.
Update (02/25): Added to the PR description explicitly the issues fixed and closed. Before they were marked in the comment section.
Release Note
Fix crash when running opencode run --attach ... --agent ... by validating agents on the attached server.
Fixes #6489
Closes #8094
What changed
opencode run no longer crashes when used with both --attach and --agent.
This PR fixes a client-side crash that occurred before any request was sent to the attached server.
Problem
The issues were raised in #6489 and #8094. This PR fixes those issues.
Here below is a short summary of the issues:
Running opencode run with --attach + --agent would fail with:
Root cause:
Implementation
Changes are contained to packages/opencode/src/cli/cmd/run.ts:
How to reproduce (before) / verify (after)
Start a server:
Assuming you have an agent called shell_cmd_generator, run:
In practice, replace shell_cmd_generator with one of the primary agents available for you.
Before: crashes with No context found for instance.
After: completes successfully and uses the requested agent (or gracefully falls back if unavailable).
Notes