Skip to content

Harden the ClaudeCode worker adapter (weakest of the five) #366

Description

@linhdmn

Comparative adapter audit (internal/workers): claudecode.go is the shallowest — 306 lines, smallest test file (4.4KB), while omp/grok carry NDJSON stream parsers, in-stream error capture, and watchdog defaults:

  • DefaultNoProgressTimeoutMs: 0 — no watchdog by default, unlike omp/pi/grok (10m) and Q30's declared-capability pattern; a hung claude -p burns the full attempt silently.
  • Single-JSON envelope output rather than a stream; IsProgress (claudecode.go:50-52) falls back to shared NDJSON semantics that don't fit single-JSON output.
  • No adapter-specific fallback chain or cost seam (Grok/omp both have cost paths; the CLI's own total_cost_usd result field is unused).

Done when: a sane default watchdog (or documented rationale for 0), envelope-aware progress classification, cost surfaced to the ledger seam, and a test fixture matching claudecode_test.go coverage to the omp/grok tests.

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

    enhancementNew feature or requestpriority:P2Backlog — later iterations

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions