Skip to content

Pi: live view and stored output parsing #3834

Done

Description

@integry

Show Pi runs live, like the other agents: assistant text and thinking as they stream, and each tool call with its result while the task is running.

Acceptance:

  • packages/api/services/redisOutputParser.ts routes Pi JSON records (they key on type: session, message_*, tool_execution_*, turn_*, agent_*) to a new redisOutputParserPi.ts. The routing must not swallow other agents' records: Codex, OpenCode, Vibe 3 and Antigravity tests stay green.
  • Streaming text: message_update deltas are buffered per contentIndex (text_delta → assistant text, thinking_delta → thought), and text_end/thinking_end or message_end is authoritative.
  • Tools: tool_execution_start → tool_use, tool_execution_end → tool_result (with isError). Token usage comes from assistant message_end usage.
  • The live-details routes and stored output format (liveDetailsOutputParsers.ts, liveDetailsStoredOutputFormat.ts) and the task watcher handle Pi output.
  • Regression test: the fixture from the pi-agent issue through parseRedisOutput gives tool_use/tool_result pairs (one error), the final assistant text and the usage totals.

Implementation

Model on redisOutputParserVibe3.ts (normalize the new record shapes onto the existing event model) and its tests in test/redisOutputParser.test.ts.

Notes

Wire message_update records are delta-only; the full message arrives in message_end. Read stdout with an LF-only JSONL splitter: Pi's docs warn that Node readline also splits on U+2028/U+2029.

Activity

  1. propr-dev commented on Nov 27, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3834/claude-opus-5-5-pi-live-view-and-stored-o-20261127-1852-8kc
    • Base Branch: 3831-epic-pi-coding-jml
    • Worktree: issue-3834-20261127-1852-claude-opus-5-5-8kc

    🔍 Track Task Execution

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions