Skip to content

fix: bind desktop tool retries to durable receipts - #137

Open
jz-krono wants to merge 1 commit into
CopilotKit:mainfrom
jz-krono:fix/desktop-action-replay
Open

jz-krono wants to merge 1 commit into
CopilotKit:mainfrom
jz-krono:fix/desktop-action-replay

Conversation

@jz-krono

@jz-krono jz-krono commented Oct 3, 2026

Copy link
Copy Markdown

A repeated use_desktop tool call currently creates a new random receipt and can dispatch the same click or key input again. This matters when the first response is lost or a model turn repeats an uncertain step.

Require an operationId for the agent's desktop tool and scope it to the chat request or task. Persist a stable receipt ID and the hash of the full validated action before input dispatch. A repeated ID returns the prior receipt and retained screenshot, if available, without sending new input; a changed action with that ID conflicts. Direct desktop API calls keep their existing behavior.

A synthetic E2B driver fixture demonstrates the before/after effect count, restart replay, changed-input conflict, full typed-text binding beyond the receipt label, and uncertain input replay. No live E2B sandbox or user account was used.

Verification: 341 upstream tests passed; server and mobile typecheck, changed-file Biome, and diff whitespace check passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants