Skip to content

[FEATURE] Headless/batch mode for automated benchmarks and CI #23455

@jerrythomas

Description

@jerrythomas

Summary

No way to programmatically start a session with a predefined prompt, let it execute, and capture structured results. This blocks automated benchmarks, regression tests, and A/B comparisons.

Proposed

opencode --headless \
  --prompt "Fix the null pointer exception in src/parser.rs" \
  --max-turns 20 \
  --output-json result.json

Output: structured JSON with outcome, turns, tokens, files_modified, tools_used.

Use case

  • Benchmark: "Does adding MCP tools improve quality?" — run same tasks with/without, compare
  • CI: "Run these tasks, fail if quality drops below threshold"
  • Research: reproducible evaluation of AI coding assistants

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions