Problem
logger.ts outputs to console.log/console.warn/console.error even when running in plugin mode (when _logClient is set via setLogClient()). The logger already sends structured logs via _logClient.app?.log() — the console output is a redundant second channel that breaks the terminal UI.
Rule
Per plugin conventions: **console.log/console.warn/console.error is ONLY valid for the initial plugin startup message** (key === "init"). All other logging MUST go through _client?.app?.log() exclusively when in plugin mode. Console output breaks the opencode terminal UI.
Fix
In src/logger.ts:
- When
_logClient is set (plugin mode): skip console output for ALL messages except the startup "init" message
- When
_logClient is NOT set (CLI mode / testing): console output is fine (current behavior)
Problem
logger.tsoutputs toconsole.log/console.warn/console.erroreven when running in plugin mode (when_logClientis set viasetLogClient()). The logger already sends structured logs via_logClient.app?.log()— the console output is a redundant second channel that breaks the terminal UI.Rule
Per plugin conventions:
**console.log/console.warn/console.erroris ONLY valid for the initial plugin startup message** (key === "init"). All other logging MUST go through_client?.app?.log()exclusively when in plugin mode. Console output breaks the opencode terminal UI.Fix
In
src/logger.ts:_logClientis set (plugin mode): skip console output for ALL messages except the startup "init" message_logClientis NOT set (CLI mode / testing): console output is fine (current behavior)