Skip to content

[Bug]: Workflow run feed summaries show raw code from fenced code blocks instead of the reply's first sentence #43424

Done

Description

@AymanKhan9

Description

When a workflow agent reply begins with a fenced code block (such as a JSON payload or code snippet followed by a summary sentence), the one-line summary shown in the workflow run feed on web (WorkflowRunFeed) and mobile (WorkflowTimeline) displays raw code from inside the fence instead of the prose sentence that follows it.

Root Cause

workflowOneLine in packages/client-runtime/src/workflows.ts filters lines with !/^(#|```|\|)/.test(candidate). Because it only skips the opening ``` line itself without tracking whether subsequent lines are inside an open code fence (or handling ~~~ tilde fences), the very next line inside the code block is picked as the summary line.

Example

Input:

```json
{"ok": true}
```
All good. Next.
  • Actual: {"ok": true}
  • Expected: All good.

Expected Behavior

workflowOneLine should track fenced code blocks (both backtick ``` and tilde ~~~ fences, respecting fence character/length and ignoring closing fences with info strings while still treating inline triple-backtick code spans as prose) and pick the first prose sentence outside fenced code blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions