fix: prevent raw JSON dump in respond-to-comment PR replies#19
Draft
warp-dev-github-integration[bot] wants to merge 1 commit intomainfrom
Draft
fix: prevent raw JSON dump in respond-to-comment PR replies#19warp-dev-github-integration[bot] wants to merge 1 commit intomainfrom
warp-dev-github-integration[bot] wants to merge 1 commit intomainfrom
Conversation
When the agent completes work via tool calls without producing a final text message (type='agent'), the Reply to Comment step was falling back to posting the entire raw NDJSON stream as the PR comment body. Fix the JSONL parsing to: - Extract agent_reasoning text as fallback when no agent text exists - Extract run URL from system events to include a link to the full run - Never fall back to dumping raw JSONL output - Still handle non-JSONL (text format) output correctly Fixes REMOTE-1224 Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the Oz agent completes work via tool calls (e.g., editing files) without producing a final text message (
type='agent'), the "Reply to Comment" step in therespond-to-commentworkflow falls back to posting the entire raw NDJSON stream as the PR comment body. This results in comments like:See: https://github.com/warpdotdev/warp-server/pull/10070#discussion_r3029369447
Root Cause
The JSONL parsing logic in the "Reply to Comment" step only looks for events with
type === 'agent'(the agent's direct text output). When no such event exists — which happens when the agent completes its work purely through tool calls and reasoning —lastTextremains empty and the code falls back toraw:Fix
Updated the JSONL parsing in
examples/respond-to-comment.yml(and regenerated.github/workflows/respond-to-comment.yml) to:agent_reasoningtext as fallback — when there's notype: 'agent'event, the lastagent_reasoningtext is used insteadsystemevents withrun_urlare captured and appended as a "View full agent run" linkisJsonlflag tracks whether the output was JSONL format; if so, only structured content is usedoutput_format: text) is used as-isFixes REMOTE-1224
Conversation: https://staging.warp.dev/conversation/bf17e8da-31fa-4af4-b487-5d11a0b8df35
Run: https://oz.staging.warp.dev/runs/019d4f93-ca88-7dbd-9bd1-3d6b87ff75ad
This PR was generated with Oz.