Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: anomalyco/opencode
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dev
Choose a base ref
...
head repository: lytedev/opencode
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Feb 27, 2026

  1. fix(web): dispose idle MCP server instances to prevent process accumu…

    …lation
    
    In `opencode web` mode, switching projects creates new Instance entries (each
    spawning MCP server child processes) that are never cleaned up. Unlike the TUI
    which calls shutdown()/disposeAll() on exit, the web command blocks forever
    with `await new Promise(() => {})` and never reaches its `server.stop()` call.
    
    This causes unbounded process growth — each project switch leaks ~200MB of MCP
    server processes (linear, notion, etc.) that persist for the lifetime of the
    web server.
    
    Fix:
    - Add signal handlers (SIGINT, SIGTERM, SIGHUP) to the web command that call
      Instance.disposeAll() with a 5s timeout before exiting
    - Add idle eviction to Instance: track last access time per directory, sweep
      every 60s, and dispose instances idle for >5 minutes
    - Clean up lastAccess bookkeeping in dispose() and disposeAll()
    lytedev committed Feb 27, 2026
    Configuration menu
    Copy the full SHA
    42f10f1 View commit details
    Browse the repository at this point in the history
  2. feat(web): embed UI in binary; bypass auth for static routes

    Build the app during 'bun run script/build.ts' and bundle all dist files
    into the binary using Bun's 'with { type: "file" }' import syntax. Falls
    back to the existing app.opencode.ai CDN proxy when built with
    --skip-embed-web-ui, or when OPENCODE_DISABLE_EMBEDDED_WEB_UI=1.
    
    Also adds --skip-app-build flag to skip the Vite build step when dist is
    already fresh.
    
    Auth is bypassed for all non-/v1 paths so the UI can load its own login
    prompt before the user has authenticated.
    
    Closes #8549, #6352, #12445
    lytedev committed Feb 27, 2026
    Configuration menu
    Copy the full SHA
    a7c1266 View commit details
    Browse the repository at this point in the history
Loading