Skip to content

feat(chat): integrate Claude Agent SDK 0.3.211#843

Merged
arul28 merged 2 commits into
mainfrom
ade/github-anthropics-releases-ade-chats-56ae0bf1
Jul 17, 2026
Merged

feat(chat): integrate Claude Agent SDK 0.3.211#843
arul28 merged 2 commits into
mainfrom
ade/github-anthropics-releases-ade-chats-56ae0bf1

Conversation

@arul28

@arul28 arul28 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • align desktop and ADE Code on Claude Agent SDK 0.3.211
  • add command lifecycle, terminal reasons, interrupt receipts/cancellation, conversation resets, Claude goals, nested-agent metadata, and richer tool rendering
  • stream live context occupancy and add a guarded 97% turn-boundary compaction fallback that never preempts Claude's natural compaction
  • carry the new event/UI behavior across desktop, web, ADE Code, and iOS where applicable

Validation

  • desktop and ADE CLI typechecks
  • desktop and ADE CLI production builds
  • desktop lint (0 errors)
  • targeted Claude chat/service/renderer/TUI suites
  • desktop shards 1-8: all feature coverage green; one pre-existing macOS-only sync mock failure in syncService.test.ts
  • ADE CLI: 94 files / 1,965 tests passed
  • modified Swift sources parse cleanly
  • targeted simulator XCTest deferred because unrelated Xcode jobs were already running, per repository safety policy

ADE   Open in ADE  ·  ade/github-anthropics-releases-ade-chats-56ae0bf1 branch  ·  PR #843

Summary by CodeRabbit

  • New Features

    • Added Claude goal visibility across desktop, terminal, and iOS chat experiences, including iteration details and goal updates.
    • Added clearer conversation reset, interruption, cancellation, retry, and terminal failure messages.
    • Improved context usage tracking, compaction indicators, and overflow recovery.
    • Enhanced subagent displays with nesting, usage, worktree, and parent information.
    • Added timestamps, timeout details, grep totals, and richer activity status to chat messages.
  • Bug Fixes

    • Improved queued-message cancellation and steering-state cleanup.
    • Preserved streamed text and metadata during resumed or replayed responses.

Greptile Summary

This PR integrates Claude Agent SDK 0.3.211 across desktop, ADE CLI, and iOS. The main changes are:

  • Updated Claude Agent SDK dependencies and lockfiles.
  • Added shared chat events for Claude goals, command lifecycle, interrupts, conversation resets, terminal reasons, and live context usage.
  • Added guarded turn-boundary context compaction fallback for Claude context overflow cases.
  • Updated desktop, TUI, and iOS chat rendering for new goal, reset, compaction, terminal, and subagent metadata states.
  • Added targeted tests and documentation for the new Claude event surfaces.

Confidence Score: 5/5

This PR appears safe to merge.

No review findings were identified. The highest-risk changes are in Claude service event normalization and compaction fallback, and they are guarded by state checks and covered by targeted tests.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • A HEAD^ comparison was attempted, and an environmental dependency-resolution blocker was recorded in the before log.
  • The PR-targeted run was executed and completed with exit code 0, with Vitest reporting 10 passed files and 271 passed tests.
  • UI launch and Playwright navigation were attempted, and a navigation timeout blocker was observed in the UI capture logs.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/desktop/src/main/services/chat/agentChatService.ts Adds Claude SDK 0.3.211 event handling for goals, command lifecycle, interrupts, conversation resets, live context usage, terminal reasons, and guarded compaction fallback.
apps/desktop/src/shared/types/chat.ts Extends shared chat event/session contracts for Claude goals, terminal reasons, context usage, resets, interrupt receipts, and command lifecycle metadata.
apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx Adds desktop rendering for context usage, Claude goals, interrupt receipts, terminal reasons, and queued command lifecycle notices.
apps/desktop/src/renderer/components/chat/chatTranscriptRows.ts Updates transcript collapsing and grouping for new Claude lifecycle events and enriched rendering metadata.
apps/ade-cli/src/tuiClient/aggregate.ts Updates TUI aggregation for conversation reset dividers and command lifecycle clearing of queued steers.
apps/ade-cli/src/tuiClient/format.ts Adds terminal reason labels and notice rendering for resets, interrupt receipts, and queued-message lifecycle events.
apps/ios/ADE/Models/RemoteModels.swift Extends iOS remote event decoding for new Claude lifecycle, goal, terminal reason, and context usage events.
apps/ios/ADE/Views/Work/WorkEventMapping.swift Maps new remote Claude events into mobile work timeline models and system notices.
apps/desktop/src/main/services/chat/agentChatService.test.ts Adds service coverage for Claude SDK 0.3.211 lifecycle, compaction, reset, interrupt, goal, and terminal-reason behavior.
apps/ios/ADETests/ADETests.swift Adds iOS decoding and timeline tests for the new Claude event surfaces.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
  participant SDK as Claude Agent SDK 0.3.211
  participant Service as agentChatService
  participant Store as Chat event log/session state
  participant Desktop as Desktop renderer
  participant CLI as ADE CLI TUI
  participant iOS as iOS Work timeline

  SDK->>Service: stream events (goal, context_usage, lifecycle, reset, result)
  Service->>Service: normalize terminal reasons, goals, compaction guardrail
  Service->>Store: emit shared AgentChatEvent envelopes
  Store-->>Desktop: transcript/session updates
  Store-->>CLI: transcript/session updates
  Store-->>iOS: remote event payloads
  Desktop->>Desktop: render goal cards, usage, resets, lifecycle notices
  CLI->>CLI: aggregate/render goal banner and lifecycle notices
  iOS->>iOS: decode/map work timeline rows
  Service->>SDK: issue /compact only at guarded turn boundary when fallback conditions hold
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
  participant SDK as Claude Agent SDK 0.3.211
  participant Service as agentChatService
  participant Store as Chat event log/session state
  participant Desktop as Desktop renderer
  participant CLI as ADE CLI TUI
  participant iOS as iOS Work timeline

  SDK->>Service: stream events (goal, context_usage, lifecycle, reset, result)
  Service->>Service: normalize terminal reasons, goals, compaction guardrail
  Service->>Store: emit shared AgentChatEvent envelopes
  Store-->>Desktop: transcript/session updates
  Store-->>CLI: transcript/session updates
  Store-->>iOS: remote event payloads
  Desktop->>Desktop: render goal cards, usage, resets, lifecycle notices
  CLI->>CLI: aggregate/render goal banner and lifecycle notices
  iOS->>iOS: decode/map work timeline rows
  Service->>SDK: issue /compact only at guarded turn boundary when fallback conditions hold
Loading

Reviews (1): Last reviewed commit: "fix(chat): align context dial warning th..." | Re-trigger Greptile

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Jul 17, 2026 3:31am

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@arul28, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2e191506-0bca-4548-bb94-bb1acee186e0

📥 Commits

Reviewing files that changed from the base of the PR and between e50a279 and 920ccb8.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/components/chat/usage/ContextUsageDial.test.tsx
  • apps/desktop/src/renderer/components/chat/usage/ContextUsageDial.tsx
📝 Walkthrough

Walkthrough

Changes

Claude chat protocol and client surfaces

Layer / File(s) Summary
Shared event and session contracts
apps/desktop/src/shared/types/chat.ts, apps/desktop/src/shared/contextCompaction.ts, apps/desktop/src/shared/chatSubagents.ts
Shared models add Claude goals, lifecycle events, terminal reasons, context-compaction triggers, provider timestamps, subagent parent identifiers, and protocol metadata.
Claude service lifecycle and persistence
apps/desktop/src/main/services/chat/agentChatService.ts, apps/desktop/src/main/services/chat/*
Claude streaming now handles terminal classification, goals, protocol capabilities, context usage, compaction, queued-message cancellation, interrupts, conversation resets, and persisted UUID state.
Desktop transcript, goals, and subagents
apps/desktop/src/renderer/components/chat/*
Desktop rendering adds terminal-reason labels, retry indicators, queued-message receipts, Claude goal cards, richer tool/subagent metadata, timestamps, fallback compaction labels, and nested subagent depth.
CLI event aggregation and goal rendering
apps/ade-cli/src/tuiClient/*
The CLI derives Claude goals, routes conversation resets, resolves queued steers, renders lifecycle notices and terminal reasons, and displays Claude goal banners.
iOS decoding and work timeline
apps/ios/ADE/Models/*, apps/ios/ADE/Views/Work/*
iOS decodes the expanded event protocol and renders conversation resets, Claude goals, terminal reasons, lifecycle notices, and updated timeline metadata.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • arul28/ADE#80: Extends the same assistant text batching pipeline with provider-origin timestamps.
  • arul28/ADE#190: Overlaps with terminal-reason labels and desktop chat rendering.
  • arul28/ADE#581: Modifies the same CLI chat rendering path for lifecycle and compaction notices.

Suggested labels: desktop, ios, docs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: integrating Claude Agent SDK 0.3.211 into chat-related code.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/github-anthropics-releases-ade-chats-56ae0bf1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@arul28 arul28 changed the title claude-sdk-feature-audit -> Primary feat(chat): integrate Claude Agent SDK 0.3.211 Jul 17, 2026
@arul28

arul28 commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/desktop/src/renderer/components/chat/usage/ContextUsageDial.tsx`:
- Around line 20-22: Update the ratio threshold in the color-selection logic
around the visible amber-tier condition so it uses the same rounded percentage
calculation as buildContent’s tooltip warning. Ensure values from 79.5% through
79.99% switch to amber consistently with the warning, while preserving the
existing color behavior for other ranges.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0d14d10f-9524-4f79-ab93-55ed42e2f0ea

📥 Commits

Reviewing files that changed from the base of the PR and between 913df55 and e50a279.

⛔ Files ignored due to path filters (7)
  • apps/ade-cli/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
  • apps/desktop/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
  • docs/features/agents/README.md is excluded by !docs/**
  • docs/features/chat/README.md is excluded by !docs/**
  • docs/features/chat/tool-system.md is excluded by !docs/**
  • docs/features/chat/transcript-and-turns.md is excluded by !docs/**
  • docs/logging.md is excluded by !docs/**
📒 Files selected for processing (48)
  • apps/ade-cli/package.json
  • apps/ade-cli/src/tuiClient/__tests__/ChatView.test.tsx
  • apps/ade-cli/src/tuiClient/__tests__/adeApi.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/aggregate.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/appInput.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/format.test.ts
  • apps/ade-cli/src/tuiClient/adeApi.ts
  • apps/ade-cli/src/tuiClient/aggregate.ts
  • apps/ade-cli/src/tuiClient/app.tsx
  • apps/ade-cli/src/tuiClient/components/ChatView.tsx
  • apps/ade-cli/src/tuiClient/format.ts
  • apps/ade-cli/src/tuiClient/terminalReason.ts
  • apps/desktop/package.json
  • apps/desktop/src/main/services/chat/agentChatService.test.ts
  • apps/desktop/src/main/services/chat/agentChatService.ts
  • apps/desktop/src/main/services/chat/chatTextBatching.ts
  • apps/desktop/src/main/services/chat/claudeAssistantTextDedup.test.ts
  • apps/desktop/src/main/services/chat/contextCompactionEmitter.ts
  • apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatPane.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
  • apps/desktop/src/renderer/components/chat/ChatSubagentsPanel.tsx
  • apps/desktop/src/renderer/components/chat/ContextCompactDivider.tsx
  • apps/desktop/src/renderer/components/chat/GoalCard.test.tsx
  • apps/desktop/src/renderer/components/chat/GoalCard.tsx
  • apps/desktop/src/renderer/components/chat/SubagentActivityCards.tsx
  • apps/desktop/src/renderer/components/chat/chatEventDisplay.test.ts
  • apps/desktop/src/renderer/components/chat/chatEventDisplay.ts
  • apps/desktop/src/renderer/components/chat/chatExecutionSummary.test.ts
  • apps/desktop/src/renderer/components/chat/chatExecutionSummary.ts
  • apps/desktop/src/renderer/components/chat/chatTranscriptRows.ts
  • apps/desktop/src/renderer/components/chat/usage/ContextUsageDial.tsx
  • apps/desktop/src/renderer/components/chat/usage/contextUsageModel.test.ts
  • apps/desktop/src/shared/chatSubagents.test.ts
  • apps/desktop/src/shared/chatSubagents.ts
  • apps/desktop/src/shared/contextCompaction.ts
  • apps/desktop/src/shared/types/chat.ts
  • apps/ios/ADE/Models/RemoteModels.swift
  • apps/ios/ADE/Views/Work/WorkActivityIndicator.swift
  • apps/ios/ADE/Views/Work/WorkChatHeaderAndMessageViews.swift
  • apps/ios/ADE/Views/Work/WorkChatRichCardViews.swift
  • apps/ios/ADE/Views/Work/WorkChatSessionView.swift
  • apps/ios/ADE/Views/Work/WorkContextCompactDivider.swift
  • apps/ios/ADE/Views/Work/WorkErrorAndMessageHelpers.swift
  • apps/ios/ADE/Views/Work/WorkEventMapping.swift
  • apps/ios/ADE/Views/Work/WorkModels.swift
  • apps/ios/ADE/Views/Work/WorkTimelineHelpers.swift
  • apps/ios/ADETests/ADETests.swift

Comment thread apps/desktop/src/renderer/components/chat/usage/ContextUsageDial.tsx Outdated
@arul28
arul28 merged commit e6b109a into main Jul 17, 2026
13 of 14 checks passed
@arul28
arul28 deleted the ade/github-anthropics-releases-ade-chats-56ae0bf1 branch July 17, 2026 04:16
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.

1 participant