The implementation is complete and verified. Let me commit and push.
Pushed to ai/issue-2. The implementation is complete and verified locally.
Built against the real opencode run --format json schema (validated locally):
Run agent now uses --format json → captures /tmp/events.jsonl, then reconstructs /tmp/agent_out.md from assistant text parts (equivalent to plain --auto output, so all existing Publish/awk marker parsing is unchanged).
Build activity log step (dev agents only) filters to tool_use (tool + truncated title/input — includes commits) and text (reasoning) → /tmp/activity_log.md.
Publish posts it as a separate collapsible <details> comment on the PR thread — additive to the summary comment.
Removed both TEMP/DEBUG schema-discovery steps.
Reasoning reuse on re-trigger is free: the existing "fetch full issue thread" step already feeds prior comments back into the next run's prompt.
Summary
Post the agent's opencode activity trail (tool calls + reasoning) as a separate comment on the PR thread, so a follow-up run can see what the previous run did. Replaces the throwaway TEMP/DEBUG schema-discovery commits with the real implementation. Switches the "Run agent" step from plain --auto to --auto --format json, captures the raw event stream, and reconstructs the plain-text reply from assistant text parts so the existing Publish logic is unchanged.
Changes
Removed the two TEMP/DEBUG steps (commits da6f0d5, d0ddb06) — schema discovery is done.
"Run agent": --format json → /tmp/events.jsonl; reconstruct /tmp/agent_out.md from text parts; transient-error grep now targets events.jsonl.
New "Build activity log" step: jq parser filtering tool_use (truncated title/input, includes commits) + text (reasoning) → /tmp/activity_log.md; dev agents only (comment-only roles produce empty/noise logs).
"Publish": posts the activity log as a separate collapsible <details> PR comment — additive to the existing summary/PR-description comment.
Reasoning continuity on re-trigger needs no extra state: the existing "Fetch the full issue thread" step already re-feeds all prior comments (including the new log comment) into the next run's prompt.
The implementation is complete and verified. Let me commit and push.
Pushed to `ai/issue-2`. The implementation is complete and verified locally.
Built against the real `opencode run --format json` schema (validated locally):
- **Run agent** now uses `--format json` → captures `/tmp/events.jsonl`, then reconstructs `/tmp/agent_out.md` from assistant `text` parts (equivalent to plain `--auto` output, so all existing Publish/awk marker parsing is unchanged).
- **Build activity log** step (dev agents only) filters to `tool_use` (tool + truncated title/input — includes commits) and `text` (reasoning) → `/tmp/activity_log.md`.
- **Publish** posts it as a separate collapsible `<details>` comment on the PR thread — additive to the summary comment.
- Removed both `TEMP`/`DEBUG` schema-discovery steps.
- Reasoning reuse on re-trigger is free: the existing "fetch full issue thread" step already feeds prior comments back into the next run's prompt.
## Summary
Post the agent's opencode activity trail (tool calls + reasoning) as a separate comment on the PR thread, so a follow-up run can see what the previous run did. Replaces the throwaway `TEMP`/`DEBUG` schema-discovery commits with the real implementation. Switches the "Run agent" step from plain `--auto` to `--auto --format json`, captures the raw event stream, and reconstructs the plain-text reply from assistant `text` parts so the existing Publish logic is unchanged.
## Changes
- Removed the two `TEMP`/`DEBUG` steps (commits `da6f0d5`, `d0ddb06`) — schema discovery is done.
- "Run agent": `--format json` → `/tmp/events.jsonl`; reconstruct `/tmp/agent_out.md` from `text` parts; transient-error grep now targets `events.jsonl`.
- New "Build activity log" step: jq parser filtering `tool_use` (truncated title/input, includes commits) + `text` (reasoning) → `/tmp/activity_log.md`; dev agents only (comment-only roles produce empty/noise logs).
- "Publish": posts the activity log as a separate collapsible `<details>` PR comment — additive to the existing summary/PR-description comment.
- Reasoning continuity on re-trigger needs no extra state: the existing "Fetch the full issue thread" step already re-feeds all prior comments (including the new log comment) into the next run's prompt.
---
Resolves #2 · 🤖 @senior
Switch the real 'Run agent' step to --format json (replacing the two
TEMP/DEBUG schema-discovery commits da6f0d5/d0ddb06), capture the raw
event stream, and reconstruct the plain-text reply from the assistant
'text' parts so the existing Publish logic is unchanged.
Add a 'Build activity log' step that filters the event stream to
tool_use (with truncated title/input) and text (reasoning) events.
The Publish step posts that trail as a separate collapsible comment on
the PR thread (dev agents only — comment-only roles do no tool calls).
This is additive to the existing summary/PR-description comment.
Reasoning reuse on a follow-up run is free: the existing 'fetch full
issue thread' step already re-feeds all prior comments (including this
new log comment) into the next run's prompt, so the agent sees what it
did last time.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The implementation is complete and verified. Let me commit and push.
Pushed to
ai/issue-2. The implementation is complete and verified locally.Built against the real
opencode run --format jsonschema (validated locally):--format json→ captures/tmp/events.jsonl, then reconstructs/tmp/agent_out.mdfrom assistanttextparts (equivalent to plain--autooutput, so all existing Publish/awk marker parsing is unchanged).tool_use(tool + truncated title/input — includes commits) andtext(reasoning) →/tmp/activity_log.md.<details>comment on the PR thread — additive to the summary comment.TEMP/DEBUGschema-discovery steps.Summary
Post the agent's opencode activity trail (tool calls + reasoning) as a separate comment on the PR thread, so a follow-up run can see what the previous run did. Replaces the throwaway
TEMP/DEBUGschema-discovery commits with the real implementation. Switches the "Run agent" step from plain--autoto--auto --format json, captures the raw event stream, and reconstructs the plain-text reply from assistanttextparts so the existing Publish logic is unchanged.Changes
TEMP/DEBUGsteps (commitsda6f0d5,d0ddb06) — schema discovery is done.--format json→/tmp/events.jsonl; reconstruct/tmp/agent_out.mdfromtextparts; transient-error grep now targetsevents.jsonl.tool_use(truncated title/input, includes commits) +text(reasoning) →/tmp/activity_log.md; dev agents only (comment-only roles produce empty/noise logs).<details>PR comment — additive to the existing summary/PR-description comment.Resolves #2 · 🤖 @senior