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
attach client should not refresh models.dev on every connection #10781
When using opencode attach to connect to an already running opencode serve server, the client still performs a models.dev refresh on every connection, causing ~1 second delay.
Expected Behavior
The attach client should:
Skip models.dev network request
Reuse model information from the server
Connect instantly (< 100ms)
Current Behavior
$ time opencode attach http://localhost:4096 --version
INFO 2026-01-27T06:27:37 +20ms service=models.dev file={} refreshing
1.1.36
real 1.236s
The models.dev refreshing log appears even though the server already has this information cached.
Environment
opencode version: 1.1.36
macOS (Apple Silicon)
Server running: opencode serve --port 4096
Client: opencode attach http://localhost:4096
Impact
Every new terminal session has ~1 second startup delay, which defeats the purpose of the server/client architecture (fast reconnection).
Suggested Fix
Move models.dev refresh to server-side only
Client should fetch model list from server via the existing connection
Or add --skip-model-refresh flag / OPENCODE_SKIP_MODEL_REFRESH env var
Activity
github-actions commentedon Jan 27, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
fix(perf): skip models.dev refresh when running as attach client
github-actions commentedon Mar 29, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.