Skip to content

[bug] [config-context] getConfigContext() called before initConfigContext() warning appears on every startup and obscures TUI #15357

Closed

Description

@khhan0423

Description

Description

Every time opencode starts, the following warning is printed to stderr before
the TUI initializes, visually obscuring the input area:

[config-context] getConfigContext() called before initConfigContext(); defaulting to CLI paths.

This message appears consistently on every launch and cannot be suppressed without
redirecting stderr externally (e.g. opencode 2>/dev/null).

Steps to Reproduce

  1. Install opencode v1.2.15 with oh-my-opencode plugin
  2. Run opencode in any directory
  3. Observe the warning printed before TUI renders

Expected Behavior

Either:

  • initConfigContext() is called before any code that depends on it, or
  • The warning is suppressed / demoted to debug-level logging only

Actual Behavior

Warning is printed to stderr on every startup, overlapping with the TUI interface
and forcing users to scroll or wait for it to clear.

Environment

  • opencode version: v1.2.15
  • oh-my-opencode version: latest
  • OS: Debian (WSL2 on Windows)
  • Shell: bash

Workaround

alias opencode='opencode 2>/tmp/opencode-stderr.log'

This hides the warning but also swallows legitimate errors, which is not ideal.

Image

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 27, 2026
  2. khhan0423 commented on Feb 27, 2026

    @khhan0423
    Author

    Resolved. Root cause was outdated oh-my-opencode plugin (v3.8.5).
    Updating to v3.9.0 fixed the issue.

  3. DEAN-Cherry commented on Mar 2, 2026

    @DEAN-Cherry

    Resolved. Root cause was outdated oh-my-opencode plugin (v3.8.5). Updating to v3.9.0 fixed the issue.

    Still happening (from v3.9.0 -> 3.10.0), why can't the oh-my-opencode upgrade itself?

  4. DEAN-Cherry commented on Mar 2, 2026

    @DEAN-Cherry

    Resolved. Root cause was outdated oh-my-opencode plugin (v3.8.5). Updating to v3.9.0 fixed the issue.

    Still happening (from v3.9.0 -> 3.10.0), why can't the oh-my-opencode upgrade themselves?

    opencode logs:

    WARN 2026-03-02T08:05:10 +225ms service=bun pkg=oh-my-opencode cachedVersion=3.9.0 Failed to resolve latest version, using cached

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 workingcoreAnything pertaining to core functionality of the application (opencode server stuff)windows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions