Skip to content

馃悰 Direct Claude sessions return 400: text content blocks must be non-empty#240

Description

@eba8

Summary

When sending messages to a direct Claude session from the Control Deck, the Claude API returns:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"},"request_id":"..."}

This happens with both plain text messages and screenshot/image attachments.

Environment

  • OrbitDock server: v0.10.0
  • Host OS: Ubuntu 24.04.4 LTS (headless, Tailscale)
  • Client: macOS desktop app (TestFlight 0.7.0 Build 3)

Repro

  1. Open a direct Claude session (tested with weblime-agent project)
  2. Type a message in the Control Deck and send
  3. The API returns the 400 error shown above
  4. Retrying with different content (plain text, screenshots) produces the same error

This has happened across multiple sessions over the last two days, not a one-off.

Observed behavior

  • The 400 error displays inline in the conversation view
  • The OrbitDock server log (~/.orbitdock/logs/server.log) does not log the error - it only shows the Claude CLI spawn. The error is happening inside the Claude CLI subprocess pipe.
  • The server log shows Spawning Claude CLI directly with --input-format stream-json but there's no debug logging of what gets written to the CLI's stdin.

Suspected cause

Something in the message serialization path between the Control Deck input and the Claude CLI stdin is producing an empty text content block. The Claude API then rejects it.

Request

  • Could stdin writes to the Claude CLI be logged (at debug level) so this can be traced?
  • The server should probably validate that content blocks are non-empty before writing them to the CLI subprocess.

Activity

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

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions