5.2 KiB
REMOTE-1573 — Settings to gate local-to-cloud handoff and snapshot upload
Summary
Add user-facing settings to control local-to-cloud handoff, gate the & prefix entrypoint independently, and ensure snapshot uploads are disabled when cloud conversations are off.
Figma: none provided
Behavior
Setting: handoff enabled
-
A new boolean setting "Cloud handoff" appears in the AI settings page under the Cloud Agents section. It defaults to enabled.
-
When the setting is enabled, all local-to-cloud handoff surfaces are available: the
&compose prefix, the/handoffslash command, and the "Handoff to cloud" footer chip in agent view. -
When the setting is disabled, all three surfaces are hidden or inert:
- Typing
&as the first character in agent input does not enter cloud handoff compose mode. - The
/handoffslash command is not shown in the slash command menu and returnsfalse(no-op) if invoked programmatically. - The "Handoff to cloud" footer chip is not rendered.
WorkspaceAction::OpenLocalToCloudHandoffPanedispatches are no-ops.
- Typing
-
The setting is persisted locally and synced to cloud via the existing
define_settings_group!/ Warp Drive settings infrastructure, following the pattern of other AI settings (e.g.orchestration_enabled). TOML path:agents.warp_agent.other.cloud_handoff_enabled.
Setting: & prefix entrypoint enabled
-
A second boolean setting "Use & to trigger handoff" appears as a sub-setting beneath the handoff toggle. It defaults to enabled.
-
When this sub-setting is enabled and the parent handoff setting is also enabled, typing
&as the first character in a local agent conversation's input activates cloud handoff compose mode (existing behavior). -
When the sub-setting is disabled (but the parent is enabled), the
&prefix no longer triggers handoff compose mode. The/handoffslash command and footer chip remain available — only the keyboard shortcut is suppressed. -
When the parent handoff setting is disabled, the
&sub-setting row is hidden entirely. Its stored value is preserved so re-enabling the parent restores the user's previous choice.
Force-disabling handoff when prerequisites are missing
-
The handoff setting is force-disabled (toggle rendered checked-off and non-interactive) when either of these conditions is true:
- The user's cloud conversation storage setting is off (user-level
is_cloud_conversation_storage_enabled == false, or org-levelcloud_conversation_storage_settings == Disable). - The user or org has AI disabled.
- The user's cloud conversation storage setting is off (user-level
-
When force-disabled, the toggle shows a tooltip explaining why: "Cloud handoff requires cloud conversations to be enabled."
-
When force-disabled, the effective value of the setting is
falseregardless of the stored value. All handoff surfaces (invariants 3a–3d) are suppressed. -
If the prerequisites become satisfied again (user re-enables cloud conversations), the toggle becomes interactive and the stored value takes effect again.
Snapshot gating: local-to-cloud handoff
-
When the effective handoff setting is disabled (either by user choice or force-disabled), no local-to-cloud handoff flow runs, so
fork_conversationandupload_snapshot_for_handoffare never called. This is a natural consequence of invariant 3, not a separate gate. -
Independently of the handoff setting, if cloud conversation storage is disabled at the time a cloud agent is spawned (from any surface — cloud mode compose, handoff, etc.), the client sets
snapshot_disabled: trueon theSpawnAgentRequestso the cloud agent's end-of-run snapshot upload is also skipped. -
The
snapshot_disabledfield is added toSpawnAgentRequestas an optional boolean. WhenNoneor absent, the server/agent uses its default behavior (snapshot enabled). WhenSome(true), the cloud agent skips the end-of-run snapshot upload pipeline.
Snapshot gating: all cloud agent spawns
-
The
snapshot_disabledflag is set on every cloud agent spawn from the client (not just handoff spawns) when cloud conversation storage is disabled. This includes spawns from cloud mode compose, the agent management view, and any other client-initiated spawn path that goes throughAmbientAgentViewModel::spawn_agentorspawn_agent_with_request. -
Cloud-to-cloud follow-up submissions (
submit_cloud_followup) are not gated — follow-ups are allowed regardless of cloud conversation storage, since the parent cloud run already has a conversation. However, thesnapshot_disabledflag propagates to follow-up runs the same way it does for initial spawns.
Interaction with cloud-to-cloud handoff
- The handoff setting gates local-to-cloud handoff only. Cloud-to-cloud follow-ups (the "Continue" tombstone flow gated by
HandoffCloudCloud) are unaffected by this setting.
Edge cases
-
If the user disables cloud conversation storage while a local-to-cloud handoff is in progress (fork + snapshot upload already in flight), the in-flight operation completes. The setting change takes effect on the next handoff attempt.
-
The setting does not affect the SDK/CLI
ozagent path. -
Anonymous and logged-out users never see the handoff setting (AI settings are hidden when AI is disabled, and AI is disabled for anonymous/logged-out users).