Skip to content

Bug: wizard hook emits 'Claude Code update available' banner inside OpenCode sessions #24

@BaseInfinity

Description

@BaseInfinity

Problem

The wizard's instructions-loaded-check.sh hook runs npm view @anthropic-ai/claude-code version and emits a Claude Code update nudge inside an OpenCode session:

=== SDLC Wizard ===
Claude Code update available: 2.1.150 → 2.1.168 (run: npm install -g @anthropic-ai/claude-code)
===================

This is wrong on two levels:

  1. The user is in OpenCode, not Claude Code — the Claude Code version is irrelevant here.
  2. The npm install suggestion actively points users toward the competing product inside the OpenCode lane.

Root cause

instructions-loaded-check.sh lines ~260-265 check for Claude Code updates unconditionally, regardless of which host tool (Claude Code vs OpenCode vs Codex) invoked the hook.

Fix

Gate the Claude Code update check on the host tool. If running inside OpenCode (e.g. detect via OPENCODE_SESSION env var, or absence of CLAUDE_* vars), skip the Claude Code version check entirely. Only emit it when the hook is running under Claude Code.

Alternatively, remove the cross-product update nudge entirely — each tool's own update mechanism handles this better.

Environment

  • OpenCode: 1.16.2
  • opencode-sdlc-wizard: 0.13.4
  • macOS 15.1 arm64
  • Reproduced: banner appears on every session start in the OpenCode TUI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions