Skip to content

[Bug] oclite: Debug logging written to stdout instead of stderr #65

@randomm

Description

@randomm

Problem

Debug log lines like [DEBUG] handleCustomCommand: Received chunk type="text" are written to stdout, interleaving with actual response text:

traits[DEBUG] handleCustomCommand: Received chunk type="text"
**:[DEBUG] handleCustomCommand: Received chunk type="text"
 Database[DEBUG] handleCustomCommand: Received chunk type="text"

Every single text chunk gets a debug line, making the output unreadable.

Root Cause

console.error() or console.log() debug statements in the custom command handler are writing to stdout. They should either:

  1. Be removed entirely (preferred — debug logging was added during development)
  2. Or use process.stderr.write() exclusively

Expected

No debug output visible during normal operation. Response text streams cleanly.

Files

  • packages/opencode/src/cli/lite/index.tshandleCustomCommand() debug logging
  • packages/opencode/src/cli/lite/session.ts — debug logging in command generator

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