forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
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:
- Be removed entirely (preferred — debug logging was added during development)
- 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.ts—handleCustomCommand()debug loggingpackages/opencode/src/cli/lite/session.ts— debug logging in command generator
Metadata
Metadata
Assignees
Labels
No labels