Problem
Since v1.1.10 (commit 982b71e), the TUI no longer starts an HTTP server by default. While this is a reasonable security improvement, it breaks workflows that depend on the HTTP server:
- Desktop app connecting to the TUI backend
- SDK integrations that communicate via HTTP
- Remote access scenarios (e.g., driving OpenCode from a mobile app)
Current Workarounds Don't Work Well
port: 0 - Fails because the schema uses .positive() which rejects 0
hostname: "127.0.0.1" - Doesn't trigger server because it matches the default
mdns: true - Works but enables mDNS discovery which may not be desired
Users need a clear, explicit way to opt into the HTTP server without side effects.
Proposed Solution
Add a server.enabled config option:
{
"server": {
"enabled": true
}
}
This provides a clear opt-in mechanism that:
- Is self-documenting (the intent is obvious)
- Has no side effects (unlike
mdns: true)
- Restores pre-982b71e behavior for users who need it
Implementation
Minimal 3-file change:
- Add
enabled: z.boolean().optional() to Server schema
- Return
enabled from resolveNetworkOptions()
- Add
networkOpts.enabled || to shouldStartServer condition
I have a PR ready with this implementation.
References
Problem
Since v1.1.10 (commit 982b71e), the TUI no longer starts an HTTP server by default. While this is a reasonable security improvement, it breaks workflows that depend on the HTTP server:
Current Workarounds Don't Work Well
port: 0- Fails because the schema uses.positive()which rejects 0hostname: "127.0.0.1"- Doesn't trigger server because it matches the defaultmdns: true- Works but enables mDNS discovery which may not be desiredUsers need a clear, explicit way to opt into the HTTP server without side effects.
Proposed Solution
Add a
server.enabledconfig option:{ "server": { "enabled": true } }This provides a clear opt-in mechanism that:
mdns: true)Implementation
Minimal 3-file change:
enabled: z.boolean().optional()to Server schemaenabledfromresolveNetworkOptions()networkOpts.enabled ||toshouldStartServerconditionI have a PR ready with this implementation.
References