Skip to content

Implement consistent tombstone and follow-up visibility behavior for cloud agent conversations.#10939

Merged
zachbai merged 4 commits into
masterfrom
zb/tombstone-input-ui
May 15, 2026
Merged

Implement consistent tombstone and follow-up visibility behavior for cloud agent conversations.#10939
zachbai merged 4 commits into
masterfrom
zb/tombstone-input-ui

Conversation

@zachbai
Copy link
Copy Markdown
Contributor

@zachbai zachbai commented May 14, 2026

Description

Demo

Demo pt II with 3rd party harnesses

This cleans up the ended-session-state UI for cloud agent conversations behind FeatureFlag::HandoffCloudCloud.

The important bit is that we now make the tombstone / followup input / CTA decision from the underlying conversation metadata.

  • Oz/Warp agent + edit access: hide the tombstone and show the input directly.
  • Oz/warp agent + view-only access: show the tombstone with Continue locally.
  • Third-party harness + edit access: show the tombstone with Continue.
  • Third-party harness + view-only access, or missing metadata: show the tombstone, no continue action.

I also pulled that branching into a shared resolver, made tombstone CTAs data-driven, and added specs/tests around the behavior so we do not keep re-implementing the same checks in terminal view code.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label May 14, 2026
Copy link
Copy Markdown
Contributor Author

zachbai commented May 14, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@zachbai zachbai changed the base branch from master to graphite-base/10939 May 15, 2026 07:13
@zachbai zachbai force-pushed the zb/tombstone-input-ui branch from d546606 to 88b464a Compare May 15, 2026 07:13
@zachbai zachbai force-pushed the graphite-base/10939 branch from 7cc792b to f78edb7 Compare May 15, 2026 07:17
@zachbai zachbai force-pushed the zb/tombstone-input-ui branch from 88b464a to 92cefc9 Compare May 15, 2026 07:17
@zachbai zachbai changed the base branch from graphite-base/10939 to master May 15, 2026 07:17
@zachbai zachbai requested a review from szgupta May 15, 2026 07:18
@zachbai zachbai marked this pull request as ready for review May 15, 2026 07:18
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 15, 2026

@zachbai

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR centralizes cloud conversation ended-state behavior around conversation metadata and data-driven tombstone CTAs. The direction is sound, but two state-resolution regressions would show the wrong UI in important edge cases.

Concerns

  • Missing conversation metadata still falls back to ambient task creator ownership, which can show mutation affordances before the conversation permission source of truth is loaded.
  • The legacy tombstone path for HandoffCloudCloud disabled is gated on !CloudModeSetupV2, which removes the existing ended tombstone for CloudModeSetupV2 sessions even though this PR is scoped behind the handoff flag.

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

}

let access = task_creator_access(&task, app);
if access == ConversationAccess::Edit {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This fallback still treats task creator ownership as enough to show mutation UI when conversation metadata is missing, but the PR contract says missing metadata should show a tombstone with no continue action. Return the missing-metadata fallback here until ServerAIConversationMetadata.permissions is available, otherwise a user can briefly get followup/continue affordances after permissions were revoked or before the conversation access model loads.

let should_insert_legacy_tombstone = {
let model = self.model.lock();
FeatureFlag::CloudModeSetupV2.is_enabled()
!FeatureFlag::CloudModeSetupV2.is_enabled()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This inverts the legacy gate, so with HandoffCloudCloud disabled and CloudModeSetupV2 enabled, ended shared ambient sessions no longer insert the tombstone. The PR is scoped behind HandoffCloudCloud, so preserve the existing CloudModeSetupV2 tombstone path when the handoff resolver returns None.

@zachbai zachbai enabled auto-merge (squash) May 15, 2026 07:58
@zachbai zachbai disabled auto-merge May 15, 2026 15:36
@zachbai zachbai closed this May 15, 2026
@zachbai zachbai reopened this May 15, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 15, 2026

@zachbai

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR centralizes cloud conversation tombstone/follow-up decisions and makes tombstone CTAs data-driven. The main structure is sound, and the supplemental security pass did not find a separate security-specific issue.

Concerns

  • Missing conversation metadata can still enable mutation UI from task creator identity, which contradicts the stated safe default for missing metadata.
  • The session-ended legacy tombstone path is disabled for CloudModeSetupV2 when HandoffCloudCloud is off, changing behavior outside the feature flag.

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

}

let access = task_creator_access(&task, app);
if access == ConversationAccess::Edit {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This fallback still treats task creator identity as edit access when server conversation metadata is missing, so owned tasks can get FollowupInput/Continue instead of the stated safe default tombstone with no action. Return a missing-metadata/unknown state here unless metadata-derived permissions confirm edit access.

let should_insert_legacy_tombstone = {
let model = self.model.lock();
FeatureFlag::CloudModeSetupV2.is_enabled()
!FeatureFlag::CloudModeSetupV2.is_enabled()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] Inverting this gate drops the existing tombstone behavior for CloudModeSetupV2 when HandoffCloudCloud is disabled: the new resolver returns None in that flag state, and this legacy branch now skips setup-v2 sessions. Keep the legacy setup-v2 path for the disabled-handoff case so the feature flag does not change existing behavior.

@zachbai zachbai merged commit 723bdf1 into master May 15, 2026
40 of 44 checks passed
@zachbai zachbai deleted the zb/tombstone-input-ui branch May 15, 2026 16:08
lawsmd pushed a commit to lawsmd/cortex that referenced this pull request May 22, 2026
…cloud agent conversations. (warpdotdev#10939)

## Description

[Demo](https://www.loom.com/share/f591784f65444cc894cedb194a2416a7)

[Demo pt II with 3rd party
harnesses](https://www.loom.com/share/df53c75e0deb4c3eba7110eb85861691)

This cleans up the ended-session-state UI for cloud agent conversations
behind `FeatureFlag::HandoffCloudCloud`.

The important bit is that we now make the tombstone / followup input /
CTA decision from the underlying conversation metadata.
- Oz/Warp agent + edit access: hide the tombstone and show the input
directly.
- Oz/warp agent + view-only access: show the tombstone with `Continue
locally`.
- Third-party harness + edit access: show the tombstone with `Continue`.
- Third-party harness + view-only access, or missing metadata: show the
tombstone, no continue action.

I also pulled that branching into a shared resolver, made tombstone CTAs
data-driven, and added specs/tests around the behavior so we do not keep
re-implementing the same checks in terminal view code.

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants