Skip to content

Bug: projectApiServer WebSocket handler spawns CLI without --verbose, breaking stream-json output #17

Closed

Description

@dahai80

Problem

When projectApiServer.ts handleChatStream() spawns fusion-code -p "..." --output-format stream-json, the CLI immediately exits with error:

Error: When using --print, --output-format=stream-json requires --verbose

This causes the WebSocket /ws/chat endpoint to return chat_done immediately with zero chat_event tokens.

Location

src/server/projectApiServer.ts line 236:

const args = ["-p", message, "--output-format", "stream-json", "--cwd", cwd];

Fix

Add --verbose to the spawn args:

const args = ["-p", message, "--output-format", "stream-json", "--verbose", "--cwd", cwd];

Environment

  • fusion-code v0.4.1
  • macOS 15.5, Apple Silicon
  • MLX running on localhost:11434

🤖 Generated with Claude Code

Activity

  1. added 2 commits that reference this issue on Jul 30, 2026
    caae6a6
    23bb62c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions