Skip to content

fix(agents): recover Copilot and OpenCode JSON output#149

Merged
kunchenguid merged 1 commit into
kunchenguid:mainfrom
Arcadia822:codex/issue-147-parse-agent-json
May 13, 2026
Merged

fix(agents): recover Copilot and OpenCode JSON output#149
kunchenguid merged 1 commit into
kunchenguid:mainfrom
Arcadia822:codex/issue-147-parse-agent-json

Conversation

@Arcadia822

@Arcadia822 Arcadia822 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • switch Copilot final-message parsing from raw JSON.parse to the shared parseAgentJson(...) recovery path
  • switch OpenCode final_answer fallback parsing to the same shared recovery path
  • add Copilot/OpenCode coverage for prose-prefixed JSON and prose-prefixed fenced JSON

Scope

This intentionally only fixes Copilot and OpenCode, matching the owner suggestion on #147. I did not move parseAgentJson(...) outside adapter implementations in this PR. Long-term, that could make sense as a shared post-adapter normalization layer, but it would be a broader abstraction change than this fix needs.

Local validation

  • npx vitest run src/core/agents/copilot.test.ts src/core/agents/opencode.test.ts
  • I also used the parseAgentJson(...)-based local build with GLM 5.1 and deep-v4-flash, and both worked as expected.

Addresses #147

Pipeline

Updates from git push no-mistakes

Local no-mistakes gate ran review, test, document, and lint for this branch. The final upstream push step was blocked by fork permissions, so the branch remains published from Arcadia822/gnhf.

@Arcadia822 Arcadia822 force-pushed the codex/issue-147-parse-agent-json branch from bb6a86e to 910721d Compare May 13, 2026 02:39
@kunchenguid kunchenguid added the ezoss/triaged Managed by ezoss label May 13, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Thanks - scoped exactly as discussed in #147, and the helpers track the rovodev shape closely. The fork-blocked no-mistakes check is understood; merging.

@kunchenguid kunchenguid merged commit 55d2c39 into kunchenguid:main May 13, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ezoss/triaged Managed by ezoss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants