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
Commit 6b8b1cf
Browse filesBrowse the repository at this point in the historyBrowse files
fix: resolve serverUrl lazily to get the actual server port
The serverUrl getter on the plugin input returns a fallback
(http://localhost:4096) until the HTTP server has bound to a port.
Destructuring it at plugin init time captures the stale fallback,
causing `opencode attach` to connect to the wrong port.
Read serverUrl lazily inside the session.created handler so the
getter runs after the server is up. Also check OPENCODE_SERVER_URL
env var first as a future-proof source (anomalyco/opencode#9099).
// Resolve the server URL lazily (on each call) instead of at init time.
23
+
// `serverUrl` is a getter on the plugin input that returns a fallback
24
+
// (http://localhost:4096) until the HTTP server has actually bound to a
25
+
// port. Reading it later — when a subagent split is needed — gives the
0 commit comments