Skip to content

fix: prefer terminal output deltas - #528

Merged
nikita-ashihmin merged 1 commit into
agentclientprotocol:mainfrom
nikita-ashihmin:ijai-2376-terminal-output-delta
Sep 22, 2026
Merged

nikita-ashihmin merged 1 commit into
agentclientprotocol:mainfrom
nikita-ashihmin:ijai-2376-terminal-output-delta

Conversation

@nikita-ashihmin

Copy link
Copy Markdown
Collaborator

When a client advertises terminal_output_delta, stream command output only through that channel. Do not repeat live output in rawOutput at completion. Session history keeps its complete output for reconstruction.\n\nTracks IJAI-2376.

Use explicit terminal output deltas when the client supports them. Avoid a duplicate full live output snapshot after streamed command output.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The capability negotiation, live event behavior, history preservation, and regression coverage are consistent with the stated goal.

Review effort: Balanced
Findings: None

What changed in this PR

Updates terminal output negotiation to prefer delta streaming while preserving complete output during history replay.

Changes:

  • Prefer explicitly advertised terminal_output_delta.
  • Avoid duplicate completion output in rawOutput.
  • Add coverage and snapshots for delta-only completion behavior.
File Description
src/​TerminalOutputMode.ts Adds delta capability detection and precedence.
src/​CodexEventHandler.ts Prevents duplicate live command output.
src/​CodexAcpServer.ts Propagates negotiated delta support into sessions.
src/​__tests__/​TerminalOutputMode.test.ts Tests mode precedence.
src/​__tests__/​CodexACPAgent/​terminal-output-events.test.ts Tests delta-only completion flows.
src/​__tests__/​CodexACPAgent/​data/​terminal-full-flow.json Updates streamed-output snapshot.
src/​__tests__/​CodexACPAgent/​data/​terminal-command-completed.json Updates completion fallback snapshot.
src/​__tests__/​acp-test-utils.ts Adds the capability default to test sessions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nikita-ashihmin
nikita-ashihmin merged commit 71bceb1 into agentclientprotocol:main Sep 22, 2026
2 checks passed
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