Skip to content

black screen when using >1.0.46 #4140

Closed

Description

@wolfie82

Description

Upgraded to opencode 1.0.47. When launching opencode I just see a black screen and the tui doesn't load. The issue is resolved by reverting to 1.0.46.

I have to kill the process manually.

OpenCode version

1.0.47

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 15.7

Terminal

iTerm2

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 9, 2025
  2. github-actions commented on Nov 9, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. rekram1-node commented on Nov 9, 2025

    @rekram1-node
    Contributor
    Image

    I don't use iterm normally but I can't replicate...

    Do u have any special custom themes or anything?

  4. wolfie82 commented on Nov 9, 2025

    @wolfie82
    ContributorAuthor

    I was able to run the issue down.

    Root Cause: Silent Plugin Initialization Failure in OpenCode v1.0.47+

    The Breaking Change
    Commit 4bb7ea9 (Nov 8, 2025) - "improve startup speed" changed how OpenCode initializes plugins:

    Before (v1.0.46):
    const cache = new Map<string, Context>()

    • Plugins initialized AFTER instance setup was complete
    • Errors during plugin init were visible/recoverable

    After (v1.0.47+):
    const cache = new Map<string, Promise>()

    • Plugins initialized INSIDE a cached Promise
    • If ANY plugin throws/hangs during init, entire Promise fails
    • OpenCode shows black screen with NO error messages

    What Caused the Failure

    export const DynamicContextLoaderPlugin: Plugin = async ({ client, ... }) => {
      await client.app.log({  // ← THIS LINE FAILED
        body: {
          service: 'dynamic-context-loader',
          level: 'info',
          message: `🔌 Plugin initialized`,
        },
      })
      return { ... }
    }
    

    Why await client.app.log() failed during init:

    • The OpenCode app/server wasn't fully ready yet during plugin initialization
    • The client.app.log() call either threw an error or hung waiting for a response
    • Since this happened inside the cached Promise, OpenCode failed silently
    • Result: Black screen, no error messages, no way to debug

    The Fix

    Don't use await client.app.log() (or any async calls to client) during plugin initialization:

    export const DynamicContextLoaderPlugin: Plugin = async ({ client, ... }) => {
      // Just initialize and return immediately - no await calls
      const manager = ContextLoaderManager.getInstance(projectPath)
      
      return {
        // Logging works fine HERE (after initialization)
        event: async ({ event }) => {
          await client.app.log({ ... })  // ✅ This is fine
        }
      }
    }
    
  5. rekram1-node commented on Nov 9, 2025

    @rekram1-node
    Contributor

    nice job tracking it down we will fix this

  6. self-assigned this
    on Nov 12, 2025
  7. Rhiz3K commented on Jan 13, 2026

    @Rhiz3K

    appeared past version 1.1.14 to me, updated to 1.1.16, 1.1.17 and 1.1.18 and it still persist, desktop app works fine
    OS: ubuntu server

  8. stefan-girlich commented on Jan 14, 2026

    @stefan-girlich

    Just started opencode for the first time; blank terminal. MacOS 15.7.3, iTerm2 3.6.6, zsh.
    In this state, there is no response to any keyboard inputs anymore and I need to close the entire tab.

    Alternative approaches I tried

    Desktop app

    Never gets past the "Initializing ..." screen.

    CLI v1.0.46

    No blank screen, but also no output whatsoever for command opencode

    serve

    For both v1.0.46 and v 1.1.19, opencode serve -print-logs --log-level DEBUG starts a web server and logs incoming GET requests when trying to open http://127.0.0.1:4096 in browser, but requests never finish; there is just no HTTP response.

    Logs

    I have bun installed via nvm, not sure if this could be an issue:

    show/hide

    ➜ ~ opencode run hello --print-logs

    INFO 2026-01-14T11:41:19 +285ms service=default version=1.1.19 args=["run","hello","--print-logs"] opencode
    INFO 2026-01-14T11:41:19 +0ms service=default directory=/Users/myusername creating instance
    INFO 2026-01-14T11:41:19 +0ms service=project directory=/Users/myusername fromDirectory
    INFO 2026-01-14T11:41:19 +8ms service=default directory=/Users/myusername bootstrapping
    INFO 2026-01-14T11:41:19 +1ms service=config path=/Users/myusername/.config/opencode/config.json loading
    INFO 2026-01-14T11:41:19 +0ms service=config path=/Users/myusername/.config/opencode/opencode.json loading
    INFO 2026-01-14T11:41:19 +0ms service=config path=/Users/myusername/.config/opencode/opencode.jsonc loading
    INFO 2026-01-14T11:41:19 +1ms service=bun cmd=["/Users/myusername/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.19","--exact"] cwd=/Users/myusername/.config/opencode running
    INFO 2026-01-14T11:41:19 +2ms service=config path=/Users/myusername/.opencode/opencode.jsonc loading
    INFO 2026-01-14T11:41:19 +0ms service=config path=/Users/myusername/.opencode/opencode.json loading
    INFO 2026-01-14T11:41:19 +0ms service=bun cmd=["/Users/myusername/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.19","--exact"] cwd=/Users/myusername/.opencode running
    INFO 2026-01-14T11:41:19 +6ms service=plugin name=CodexAuthPlugin loading internal plugin
    INFO 2026-01-14T11:41:19 +0ms service=plugin path=opencode-copilot-auth@0.0.12 loading plugin
    INFO 2026-01-14T11:41:19 +6ms service=plugin path=opencode-anthropic-auth@0.0.8 loading plugin
    INFO 2026-01-14T11:41:19 +0ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

    installed @opencode-ai/plugin@1.1.19

    [7.00ms] done
    stderr=Saved lockfile
    done
    INFO 2026-01-14T11:41:19 +0ms service=bun cmd=["/Users/myusername/.opencode/bin/opencode","install"] cwd=/Users/myusername/.config/opencode running
    INFO 2026-01-14T11:41:19 +1ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

    installed @opencode-ai/plugin@1.1.19

    [6.00ms] done
    stderr=Saved lockfile
    done
    INFO 2026-01-14T11:41:19 +0ms service=bun cmd=["/Users/myusername/.opencode/bin/opencode","install"] cwd=/Users/myusername/.opencode running
    INFO 2026-01-14T11:41:19 +21ms service=plugin path=@gitlab/opencode-gitlab-auth@1.3.0 loading plugin
    INFO 2026-01-14T11:41:19 +1ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

    Checked 3 installs across 4 packages (no changes) [1.00ms]
    stderr= done
    INFO 2026-01-14T11:41:19 +0ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

    Checked 3 installs across 4 packages (no changes) [1.00ms]
    stderr= done
    INFO 2026-01-14T11:41:19 +1ms service=bun pkg=@gitlab/opencode-gitlab-auth version=1.3.0 installing package using Bun's default registry resolution
    INFO 2026-01-14T11:41:19 +0ms service=bun cmd=["/Users/myusername/.opencode/bin/opencode","add","--force","--exact","--cwd","/Users/myusername/.cache/opencode","@gitlab/opencode-gitlab-auth@1.3.0"] cwd=/Users/myusername/.cache/opencode running

  9. stefan-girlich commented on Jan 14, 2026

    @stefan-girlich

    Seems fixed in v1.1.20

  10. Rhiz3K commented on Jan 14, 2026

    @Rhiz3K

    Not for me...

  11. shanjw21 commented on Jan 15, 2026

    @shanjw21

    same to 1.18 on macos15 m1 chip, when I run opencode , it will be hang and I have to kill it by myself

  12. rekram1-node commented on Jan 15, 2026

    @rekram1-node
    Contributor

    Is anyone using network proxies? If so refer to network section of docs plz

    If stuff is hanging maybe try running:
    opencode run hello --print-logs see what is hanging?

  13. Rhiz3K commented on Jan 15, 2026

    @Rhiz3K

    Is anyone using network proxies? If so refer to network section of docs plz

    If stuff is hanging maybe try running: opencode run hello --print-logs see what is hanging?

    thank you it solved my issue it was this file: .opencode/plugin/browser-tools-server.ts

  14. guivr commented on Jan 16, 2026

    @guivr

    +1 blank screen here on Mac app 😵‍💫

  15. 11 remaining items

  16. n-r-w commented on Jan 23, 2026

    @n-r-w

    Just use VPN and all will be fixed immediately.

  17. n-r-w commented on Jan 23, 2026

    @n-r-w

    The latest desktop update looks amazing, even with VPN :)

    Image
  18. stefan-girlich commented on Jan 23, 2026

    @stefan-girlich

    Update:

    Using v1.1.34, the blank screen is back in all cases.

    1. Ran opencode - worked; saw network traffic (update?)
    2. Closed opencode via SIGINT
    3. Ran opencode again => black screen is back, as before

    Desktop app (v1.1.34) also stuck in initial screen.

    Update to v1.1.20 fixed the black screen issue for me last week; now it's back with v.1.134 or earlier).

    Can this be escalated somehow? We have around ten confirmations across platforms in the last seven days alone.

  19. gpmarques commented on Jan 26, 2026

    @gpmarques

    Same issue here:

    • macOS Tahoe 26.2
    • opencode v1.1.134
    • I've tested with ghostty and iterm
  20. stefan-girlich commented on Jan 27, 2026

    @stefan-girlich

    OpenCode v1.1.36 - works again, MacOS 15.7.3 (24G419)

  21. night-slayer18 commented on Jan 27, 2026

    @night-slayer18

    Whats the point of doing 2-3 release each day if you're not fixing the underlying issues...many people have reported issues across multiple os and still no response from maintainers to fixing this

  22. pierrecorsini commented on Jan 30, 2026

    @pierrecorsini

    Temporary fix pinning version: code-yeongyu/oh-my-openagent#596 (comment)

  23. rekram1-node commented on Jan 30, 2026

    @rekram1-node
    Contributor

    Those having issues, can you tell me your version and plugins you are using?

    If you are NOT on latest make sure you aren't using the wrong homebrew tap, use: brew install anomalyco/tap/opencode

    If you get a blank screen try these:

    • comment out your array of plugins (some plugins can take reallyy long time to download)
    • try OPENCODE_DISABLE_DEFAULT_PLUGINS=true opencode
    • try opencode run hello --print-logs (does it hang? does anything output?)
  24. globalreset commented on Jan 30, 2026

    @globalreset

    OPENCODE_DISABLE_DEFAULT_PLUGINS=true opencode worked for me on a completely fresh install with curl instructions on linux. At last, I can finally see the TUI.

    opencode run hello --print-logs
    INFO  2026-01-30T23:35:07 +242ms service=default version=1.1.47 args=["run","hello","--print-logs"] opencode
    INFO  2026-01-30T23:35:07 +1ms service=default directory=/xyzi creating instance
    INFO  2026-01-30T23:35:07 +0ms service=project directory=/xyz fromDirectory
    INFO  2026-01-30T23:35:08 +93ms service=default directory=/xyz bootstrapping
    INFO  2026-01-30T23:35:08 +2ms service=config path=/home/scotth/.config/opencode/config.json loading
    INFO  2026-01-30T23:35:08 +1ms service=config path=/home/scotth/.config/opencode/opencode.json loading
    INFO  2026-01-30T23:35:08 +0ms service=config path=/home/scotth/.config/opencode/opencode.jsonc loading
    INFO  2026-01-30T23:35:08 +3ms service=bun cmd=["/home/scotth/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.47","--exact"] cwd=/home/scotth/.config/opencode running
    INFO  2026-01-30T23:35:08 +2ms service=config path=/home/scotth/.opencode/opencode.jsonc loading
    INFO  2026-01-30T23:35:08 +0ms service=config path=/home/scotth/.opencode/opencode.json loading
    INFO  2026-01-30T23:35:08 +1ms service=bun cmd=["/home/scotth/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.47","--exact"] cwd=/home/scotth/.opencode running
    INFO  2026-01-30T23:35:08 +5ms service=plugin name=CodexAuthPlugin loading internal plugin
    INFO  2026-01-30T23:35:08 +1ms service=plugin name=CopilotAuthPlugin loading internal plugin
    INFO  2026-01-30T23:35:08 +0ms service=plugin path=opencode-anthropic-auth@0.0.13 loading plugin
    ERROR 2026-01-30T23:35:08 +50ms service=default name=ResolveMessage message=Cannot find module '../../runtime/base64url.js' from '/home/scotth/.cache/opencode/node_modules/jose/dist/browser/jwe/flattened/decrypt.js' code=ERR_MODULE_NOT_FOUND specifier=../../runtime/base64url.js referrer=/home/scotth/.cache/opencode/node_modules/jose/dist/browser/jwe/flattened/decrypt.js importKind=import-statement fatal
    Error: Unexpected error, check log file at  for more details
    
    ResolveMessage: Cannot find module '../../runtime/base64url.js' from '/home/scotth/.cache/opencode/node_modules/jose/dist/browser/jwe/flattened/decrypt.js'
    
  25. rekram1-node commented on Jan 30, 2026

    @rekram1-node
    Contributor

    yeah recommend running w/ that env var then for now, what OS/arch are u on?

  26. globalreset commented on Jan 31, 2026

    @globalreset

    AlmaLinux 9.7 x86_64

  27. flowfelis commented on Feb 20, 2026

    @flowfelis

    The version 1.1.53 doesn't work with opencode,
    but works with the workaround OPENCODE_DISABLE_DEFAULT_PLUGINS=true opencode

    I'm on Arch Linux.

    I'm attaching opencode run hello --print-logs -> opencode_logs.txt

    BTW, What are default plugins? Just to know what we are missing..

  28. globalreset commented on Mar 12, 2026

    @globalreset

    It appears this problem is resolved in at least 1.2.24 (didn't test any earlier versions and basically hadn't touched it since Jan 30)

  29. instax-dutta commented on Jul 31, 2026

    @instax-dutta

    Same class of failure here, confirming the root cause wolfie82 identified. Our blank-TUI case (opencode 1.18.10, macOS, Apple Terminal) was caused by a plugin loaded via the plugin array in opencode.json (installed from a git URL) combined with invalid JSON in the config (a trailing comma). Result: silent plugin init failure -> blank screen with no error.

    Diagnostics + fix that worked for us:

    1. opencode --pure renders fine -> confirms it is plugin/config-related (--pure skips external plugins, which makes it a great diagnostic).
    2. Remove the offending entries from the plugin array in ~/.config/opencode/opencode.json and validate the file (python3 -c "import json; json.load(open('...'))"). A syntax error in the config silently aborts plugin loading.
    3. Delete the plugin cache: rm -rf ~/.cache/opencode/packages/ (stale cached plugin repos survive and get re-loaded).
    4. No uninstall/reinstall needed; the session database (~/.local/share/opencode/opencode.db) was never touched.

    Suggesting the maintainers keep --pure-style plugin skipping as a documented troubleshooting step in the blank-screen issues, since the failure mode is invisible otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions