Summary
The background token refresh scheduler currently writes an unconditional status line to stderr whenever an immediate scheduled refresh runs:
[token_refresh] scheduled refresh (immediate) ok=false
In TUI clients such as OpenCode via opencode-with-claude, that stderr output can appear over the interactive input line, interrupting typing.
Source
src/proxy/tokenRefresh.ts logs the event through claudeLog("token_refresh.scheduled", { ok, immediate: true }), then also writes the human-readable line with console.error(...).
Expected behavior
Scheduled refresh telemetry should stay behind the existing debug logging path, or otherwise avoid writing to stderr by default.
Actual behavior
The default scheduler path writes to stderr even without debug logging enabled.
Reproduction context
Observed with:
opencode-with-claude@1.6.11
@rynfar/meridian@1.42.1
- OpenCode TUI
- multiple Meridian profiles configured
A local hotfix removing the unconditional console.error stops the input-line pollution.
Summary
The background token refresh scheduler currently writes an unconditional status line to stderr whenever an immediate scheduled refresh runs:
In TUI clients such as OpenCode via
opencode-with-claude, that stderr output can appear over the interactive input line, interrupting typing.Source
src/proxy/tokenRefresh.tslogs the event throughclaudeLog("token_refresh.scheduled", { ok, immediate: true }), then also writes the human-readable line withconsole.error(...).Expected behavior
Scheduled refresh telemetry should stay behind the existing debug logging path, or otherwise avoid writing to stderr by default.
Actual behavior
The default scheduler path writes to stderr even without debug logging enabled.
Reproduction context
Observed with:
opencode-with-claude@1.6.11@rynfar/meridian@1.42.1A local hotfix removing the unconditional
console.errorstops the input-line pollution.