Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

OpenCode workflows lacked structured output and verbose logging for debugging workflow runs.

Changes

OpenCode Engine (pkg/workflow/opencode_engine.go)

  • Added --format json for structured output parsing
  • Added --log-level DEBUG for maximum verbosity
  • Added --print-logs to stream logs to stderr in real-time

Shared Workflow (.github/workflows/shared/opencode.md)

  • Updated Run OpenCode step with new CLI flags
  • Updated documentation to reflect enhanced logging

Test Updates

  • Fixed completions test for 5 engines (added opencode)
  • Updated OpenCode version constant to 0.15.13

Result

OpenCode workflows now emit:

opencode run "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)" \
  --print-logs \
  --log-level DEBUG \
  --format json

Enables programmatic log parsing, real-time debugging in Actions console, and better observability for workflow analysis.

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21047375867/job/60525148596#step:26:1

Review opencode and figure out how to get maximum logs, and structure JSON output


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review opencode for maximum logging and JSON structuring Add JSON output and DEBUG logging to OpenCode engine Jan 15, 2026
Copilot AI requested a review from pelikhan January 15, 2026 22:05
@pelikhan pelikhan marked this pull request as ready for review January 15, 2026 22:06
@pelikhan pelikhan merged commit 8c3a01e into copilot/add-opencode-agentic-support Jan 15, 2026
@pelikhan pelikhan deleted the copilot/review-opencode-logging branch January 15, 2026 22:06
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