Skip to content

[Go SDK] Port .harness() to Go SDK #207

@santoshkumarradha

Description

@santoshkumarradha

Overview

Port the .harness() feature to the Go SDK. All 4 providers use CLI subprocess (no native Go SDKs exist for any coding agent).

Branch: TBD (separate from feat/harness-v2)
Design doc: docs/design/harness-v2-design.md (Sections 4, 8.3)

Scope

Go SDK (sdk/go/harness/)

  • config.goHarnessConfig struct
  • types.goHarnessResult, RawResult, Metrics types
  • provider.goProvider interface
  • factory.goBuildProvider() function
  • runner.goRunner with retry + schema orchestration
  • schema.go — Schema handling (JSON Schema from struct tags)
  • cli.go — Shared CLI subprocess utilities
  • claude.go — Claude Code provider (CLI-based: claude -p)
  • codex.go — Codex provider (CLI-based: codex exec)
  • gemini.go — Gemini provider (CLI-based)
  • opencode.go — OpenCode provider (CLI-based)
  • Wire into Go Agent struct
  • Tests for all components

Notes

  • Go has no native SDKs for any coding agent → all providers are CLI subprocess
  • Schema validation via json.Unmarshal with struct tags
  • Follow patterns from Python/TS implementation
  • This is a separate effort after Python + TS are complete and validated

Dependencies

  • Depends on: Python + TS implementation being complete and merged (feat/harness-v2 PR)
  • Reference: Epic issue for full context

Acceptance Criteria

  • Feature parity with Python/TS implementation
  • All 4 providers work via CLI subprocess
  • Schema handling uses same file-write strategy
  • All tests pass
  • go test ./... clean

Metadata

Metadata

Labels

ai-friendlyWell-documented task suitable for AI-assisted developmentarea:harnessCoding agent harness integrationenhancementNew feature or requestsdk:goGo SDK related

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions