Skip to content

feat(sdk/python): isolate OpenCode harness runs - #1023

Merged
santoshkumarradha merged 1 commit into
Agent-Field:mainfrom
ddbaron:fm/agentfield-opencode-upstream
Sep 1, 2026
Merged

feat(sdk/python): isolate OpenCode harness runs#1023
santoshkumarradha merged 1 commit into
Agent-Field:mainfrom
ddbaron:fm/agentfield-opencode-upstream

Conversation

@ddbaron

@ddbaron ddbaron commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Configure each standalone Python OpenCode run with a generated agentfield-harness agent through OPENCODE_CONFIG_CONTENT.
  • Preserve caller and ambient OpenCode configuration through a deep merge while giving the generated harness fields precedence.
  • Keep credentials out of the generated configuration and preserve the task prompt as the normal positional or stdin prompt.
  • Keep AgentField's max_turns runner limit separate from OpenCode's fixed steps setting.
  • Add targeted recursion protection for AgentField orchestration skills while leaving unrelated skills available.
  • Retain an opt-in inline system-prompt compatibility path through AGENTFIELD_OPENCODE_INLINE_SYSTEM_PROMPT=1.

The overlay also carries the resolved model and OpenCode-specific reasoning variant when available. The provider-agnostic public variant API is intentionally kept in the related follow-up rather than duplicated here.

Validation

  • uv run --extra dev pytest -q tests/test_harness_provider_opencode.py tests/test_harness_agent_wiring.py tests/test_harness_runner.py tests/test_harness_types.py
  • Python compilation
  • git diff --check

The focused tests pass against the current main branch.

Related to the original proposal: #960

Related to the provider-agnostic follow-up: #1024

The fork preview remains available at ddbaron#3.

@ddbaron
ddbaron force-pushed the fm/agentfield-opencode-upstream branch from bcc96fb to 5391992 Compare August 31, 2026 22:45

@santoshkumarradha santoshkumarradha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focused Python harness tests passed locally for me, and the config-overlay path looks sound. I also approved the fork-gated workflows so the full matrix is running now.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.0 KB - 0.26 µs -26%

✓ No regressions detected

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 87.70% 87.40% ↑ +0.30 pp 🟡
sdk-go 93.10% 92.00% ↑ +1.10 pp 🟢
sdk-python 94.33% 93.73% ↑ +0.60 pp 🟢
sdk-typescript 91.72% 90.42% ↑ +1.30 pp 🟢
web-ui 84.77% 84.79% ↓ -0.02 pp 🟡
aggregate 85.85% 85.75% ↑ +0.10 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 0 ➖ no changes
sdk-go 0 ➖ no changes
sdk-python 0 ➖ no changes
sdk-typescript 0 ➖ no changes
web-ui 0 ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

@santoshkumarradha
santoshkumarradha added this pull request to the merge queue Sep 1, 2026
Merged via the queue into Agent-Field:main with commit 0b90cf2 Sep 1, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants