Fix claude preflight commands preventing task status updates.#13110
Fix claude preflight commands preventing task status updates.#13110vorporeal wants to merge 2 commits into
Conversation
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR changes LocalAgentTaskSyncModel so pane-scoped CLI session Ended events no longer remove the Claude/Oz task mapping, and adds a regression test for an incidental Ended followed by Success.
Concerns
- The mapping is now kept past CLI session end, but the diff does not add an explicit cleanup path for when the process-scoped
AgentDriverrun actually finishes. That can leave stale terminal-view mappings that later pane-scoped CLI events can apply to an old task. - This is user-visible task status behavior, and the PR does not include manual validation or screenshots/recording showing the Claude Code cloud agent status update working end to end. For this user-facing change, please include screenshots or a screen recording demonstrating it working end to end.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| // harness, and follow-ups, but the mapping belongs to the driver run. | ||
| CLIAgentSessionsModelEvent::Started { .. } | ||
| | CLIAgentSessionsModelEvent::InputSessionChanged { .. } | ||
| | CLIAgentSessionsModelEvent::Ended { .. } |
There was a problem hiding this comment.
Ended fixes preflight sessions, but this PR never removes the run-scoped mapping when the AgentDriver actually finishes. A later manual or follow-up CLI session in the same terminal view can still emit StatusChanged and update the old task; add an explicit unregister/cleanup path tied to the driver run before leaving Ended ignored.
There was a problem hiding this comment.
this actually isn't necessary, since we tear down the app when the AgentDriver finishes, but in the name of being slightly more robust to future changes, and to prevent any other agents from similarly misunderstanding this, i've made the requested changes.
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR moves Claude/third-party CLI task-status mapping ownership from individual pane-scoped CLI sessions to the process-scoped AgentDriver run. It keeps mappings alive across preflight/session Ended events, explicitly unregisters at driver completion, and adds a regression test covering an incidental Ended followed by Success.
Concerns
- No blocking correctness or security concerns found in the changed lines.
- No approved repository spec context was provided, so there was no spec drift to evaluate.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz

Description
Claude Code cloud agents register their terminal-view-to-task mapping before running the
claude auth status --jsonpreflight command. If that command is detected as a pane-scoped CLI agent session, itsEndedevent removes the mapping before the actual Claude harness starts. The real harness can then reportSuccessand update the pane icon, but the task sync model no longer knows which server task to update.Keep the task mapping for the process-scoped
AgentDriverrun instead of tying it to individual pane-scoped CLI agent sessions. This allows preflight commands and follow-up sessions to end without preventing later status updates. A regression test covers an incidentalEndedevent followed bySuccessand verifies thatSucceededis still uploaded.Linked Issue
N/A
ready-to-specorready-to-implement.Testing
rustfmt --checkon the changed Rust filesgit diff --checkcargo nextest run -p warp -E 'test(cli_task_mapping_survives_cli_session_end)'cargo check -p warp./script/runScreenshots / Videos
N/A — task lifecycle synchronization change with no UI changes.
Agent Mode
CHANGELOG-BUG-FIX: Fixed Claude Code cloud agents not reporting successful completion.