Repository navigation
Keep local terminals responsive when the cloud terminal mirror stalls - #1096
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The server deletes an agent's terminal buffer on unregister, so the sink stops before finalization instead of draining after it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…1022) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The sink stops before finalization because the server deletes an agent's terminal buffer on unregister. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A chunk written just before a connection drops can be lost with no error, so every connection change ends in a reset and a replay. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A completed sink no longer waits out the drain bound for a connection that is not ready, so an agent ending during an outage finalizes at once. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…7df78ad44 # Conflicts: # docs/CHANGES.md
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoKeep local terminals responsive during cloud mirror stalls
AI Description
Diagram
High-Level Assessment
Files changed (19)
|
Code Review by Qodo
1.
|
StopAsync is documented as safe for any concurrent callers, and a timer armed after termination has nothing left to dispose it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…7df78ad44 # Conflicts: # docs/CHANGES.md
…7df78ad44 # Conflicts: # docs/CHANGES.md # src/Capacitor.Cli.Daemon/Services/AgentOrchestrator.cs
#1022) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Closes #1022 — AI-2962
What & why
A slow server, or another agent's output, freezes
kcap agent attachand the desktop app, because the PTY read loop awaits a cloud queue shared by every agent. Each agent registered with the server now gets its own non-blockingCloudTerminalSinkwith its own pump, fed underSinksLockbeside the local sinks; the read loop never waits on it. A mirror that falls behind, meets a send that keeps failing, or crosses a reconnect is repaired in-band: a terminal reset (ESC c) followed by the daemon's 2 MB output ring, on the same ordered lane as live output. No server change.Where to look
Verification
dotnet build Capacitor.slnxafter merging main: 16 projects, 0 errors, 0 warnings.Capacitor.Cli.Daemon.Tests.Uniton the merged tree: 3442 total, 0 failed, 37 skipped — run withKCAP_DAEMON_IDandKCAP_DAEMON_EPOCHunset, sincePiHostedLaunchTestsasserts they are absent and a hosted-agent shell exports them.DisposeAsyncstops no sinks.dotnet publish -c Releasefor the CLI and the daemon: no IL2xxx/IL3xxx output.🤖 Generated with Claude Code