Skip to content

--json stdout intermittently prefixed by cmux socket error text, breaking parsers #67

Description

@mostlydev

What happened

Intermittently during a multi-agent session, tt ... --json invocations emitted a cmux socket error line on stdout before the JSON object. Any consumer doing JSON.parse/json.loads on stdout breaks; the session-long workaround was stripping everything before the first {:

tt status --json 2>&1 | python3 -c "import sys,json; s=sys.stdin.read(); d=json.loads(s[s.find('{'):])"

It reproduced repeatedly earlier in the session (presumably while the cmux socket was unavailable) and not later in the same session, so it looks conditional on cmux connectivity rather than deterministic.

Expected

With --json, stdout carries exactly one parseable JSON document; all diagnostics (including cmux socket/connectivity warnings) go to stderr.

Environment

tt 0.14.1, macOS (darwin 27), Claude Code harness (zsh), agents on cmux and manual wake transports in the same room.

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions