Skip to content

feat(REMOTE-2661): support purpose-tagged bootstrap agent prompts - #65

Draft
dmichelin wants to merge 1 commit into
mainfrom
remote-2661-bootstrap-protocol
Draft

feat(REMOTE-2661): support purpose-tagged bootstrap agent prompts#65
dmichelin wants to merge 1 commit into
mainfrom
remote-2661-bootstrap-protocol

Conversation

@dmichelin

Copy link
Copy Markdown
Contributor

Summary

Extends the shared session-sharing protocol to support "purpose-tagged bootstrap" agent prompt requests (REMOTE-2661): a token-less AgentPromptRequest can now be explicitly authorized to bootstrap a conversation for a specific reason instead of being treated as an ordinary new-conversation prompt.

Changes

  • AgentPromptPurpose enum (currently SetupFailureDebug) and idempotency_key: Option<String> added to AgentPromptRequest.
  • New UpstreamMessage::AcknowledgeAgentPromptRequest (sharer -> server), so the sharer can report which conversation it created/reused for a purpose-tagged request.
  • idempotency_key threaded through UpstreamMessage::RejectAgentPromptRequest so a rejection can be recorded under the same key a retry looks up.
  • New AgentPromptFailureReason::NotEligibleForPurpose variant.

This is part of a 3-repo change alongside warp-server and warp (client) for the retained environment-setup-failure debug-agent feature. See companion PRs for the consumers of these new types.

This PR was generated with Oz.

Adds an AgentPromptPurpose (SetupFailureDebug) and idempotency_key to
AgentPromptRequest, so a token-less request can be explicitly authorized
to bootstrap a conversation for a specific reason (e.g. debugging a
retained environment-setup-failure session) instead of being treated as
an ordinary new-conversation prompt.

Adds AcknowledgeAgentPromptRequest (sharer -> server) so the sharer can
report which conversation it created or reused for such a request, and
threads idempotency_key through RejectAgentPromptRequest so a rejection
can be recorded under the same key a retry will look up.

Co-Authored-By: Warp Agent <agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Aug 11, 2026
dmichelin added a commit to warpdotdev/warp that referenced this pull request Aug 11, 2026
…e debug bootstrap

The sharer's AgentPromptRequested handling for a no-token, purpose-tagged
bootstrap request (REMOTE-2661) authorized and started the conversation,
but never told session-sharing-server which conversation resulted. The
server's inject-message endpoint needs that conversation ID back to
resolve the caller's synchronous wait, so every bootstrap injection was
indistinguishable from a failed one and kept getting retried.

- Network::send_agent_prompt_acknowledgement / set_pending_bootstrap_ack
  / take_pending_bootstrap_ack (sharer): new pending-ack correlation
  state and the upstream message that reports a bootstrap's resulting
  conversation token.
- terminal_view_adaptor.rs: registers the pending ack right after
  accepting a purpose-tagged request (both the is_sharer fast path and
  the post-authorization path), and sends the acknowledgement once
  BlocklistAIHistoryEvent::ConversationServerTokenAssigned reports the
  new conversation's token.
- idempotency_key threaded through every send_agent_prompt_rejection
  call site so a bootstrap rejection is recorded under the same key a
  retry looks up.
- Viewer-side network.rs updated for the new required
  purpose/idempotency_key fields on AgentPromptRequest (always None for
  an ordinary live-viewer prompt) and the new
  AgentPromptFailureReason::NotEligibleForPurpose variant.

Depends on warpdotdev/session-sharing-protocol#65 for the new
AgentPromptPurpose/idempotency_key/AcknowledgeAgentPromptRequest wire
types; pinned to that PR's branch commit until it merges.

cargo check -p warp: clean.
cargo check -p warp --tests: clean.
cargo clippy -p warp --lib -- -D warnings: clean.
cargo fmt --check -p warp: clean.

Co-Authored-By: Warp Agent <agent@warp.dev>

Copy link
Copy Markdown
Contributor Author

Consumers: warpdotdev/session-sharing-server#483 (server-side inject endpoint + storage), warpdotdev/warp#14916 (client sharer-side ack). Part of the REMOTE-2661 debug-agent feature (see also warpdotdev/warp-server#14231).

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.

1 participant