Commit 44dc124
fix(cli): skip local agent validation in attach mode
When using `opencode run --attach` with the `--agent` flag, the CLI
would crash with "No context found for instance" because Agent.get()
requires the Instance context that is only available after bootstrap().
In attach mode, bootstrap() is never called since we're connecting to
a remote server. This fix skips local agent validation in attach mode,
allowing the remote server to handle agent validation instead.
Fixes anomalyco#6489 anomalyco#8094
Co-Authored-By: Claude <[email protected]>1 parent 520a814 commit 44dc124
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
0 commit comments