You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8181a42
Browse filesBrowse the repository at this point in the historyBrowse files
fix(agent): delegated schedule undo restores the previous status (#5686)
* fix(agent): delegated schedule undo restores the previous status
user_schedule_set_status read nothing before its PATCH, so its undo named
the opposite of the new status. Pausing a schedule that was already paused
offered to activate it, a state it was never in.
The tool now reads the schedule's status through the mapped schedules.list
read before the change and returns it as previous_status; undo names that
status. When the schedule already has the requested status, no write is
sent and the result says no change, with nothing to undo. When the status
cannot be read (no schedules.list in the grant, a failed read, the
schedule not on the pages read, or a status other than active or paused),
the change still happens, without previous_status and without an undo.
Refs veryfront/veryfront-issue-inbox#5002
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(agent): send the schedule write even when the read shows no change
A change made between the read and the skipped PATCH could leave the
schedule in another status while the tool reported it as set. The tool now
always sends the PATCH and reports "no change" from the read, with no undo.
Refs veryfront/veryfront-issue-inbox#5002
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/architecture/native-request-processing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ The control plane refuses to exchange an expired grant, so the client renews bef
42
42
43
43
A run that carries a grant gets seven read tools built on the client: `user_projects_search`, `user_project_get`, `user_runs_list`, `user_conversations_list`, `user_inbox_read`, `user_billing_read` and `user_account_members_list`. Each tool builds a fixed API path from validated input and returns the JSON body. A run without a grant has none of these tools.
44
44
45
-
The run also gets a tool for each phase 2 capability that the grant names in its `authorization_details`: `user_schedules_list` (`schedules.list`), `user_project_create` (`projects.create`), `user_schedule_set_status` (`schedules.activate` or `schedules.pause`, offering only the statuses the grant carries) and `user_input_request_answer` (`input_requests.answer`). The client decodes the capabilities without verifying the signature, because they only decide which tools exist; the API checks the capability of every call. Each write sends exactly the body that the API admits for its capability, through a client helper that serializes the JSON once before the grant enters the request, so a 401 retry replays the same method and bytes. Its result states what changed and how the person can undo it. An answer carries one `Idempotency-Key`, which the retry keeps. The tool set is built once per run: a renewed grant that drops a capability stops its tool before any call, and a capability that only a renewed grant names waits for the next run. A refusal tells the model that nothing changed and why, without echoing the API body.
45
+
The run also gets a tool for each phase 2 capability that the grant names in its `authorization_details`: `user_schedules_list` (`schedules.list`), `user_project_create` (`projects.create`), `user_schedule_set_status` (`schedules.activate` or `schedules.pause`, offering only the statuses the grant carries) and `user_input_request_answer` (`input_requests.answer`). The client decodes the capabilities without verifying the signature, because they only decide which tools exist; the API checks the capability of every call. Each write sends exactly the body that the API admits for its capability, through a client helper that serializes the JSON once before the grant enters the request, so a 401 retry replays the same method and bytes. Its result states what changed and how the person can undo it. `user_schedule_set_status` first reads the schedule's status through the `schedules.list` read (the API maps no single-schedule read for a grant) and returns it as `previous_status`, so undo restores that status rather than the opposite one. When the schedule already had the requested status, it still sends the write (so a change made after the read cannot leave another status behind) and reports no change, with nothing to undo. When the previous status cannot be read, the change still happens, without `previous_status` and without an undo. An answer carries one `Idempotency-Key`, which the retry keeps. The tool set is built once per run: a renewed grant that drops a capability stops its tool before any call, and a capability that only a renewed grant names waits for the next run. A refusal tells the model that nothing changed and why, without echoing the API body.
46
46
47
47
The same run resolves the project that a `studio_open_project` or `studio_navigate` call names, as the person, before it forwards the call. Studio receives the project's slug, or its id when it has no slug. A confirmed switch to another project ends the turn and does not re-scope the run. A run without a grant forwards the reference unchanged and continues in the new project. Only a run with a grant sends `x-veryfront-project-references: resolved` on its Studio MCP requests, so Studio skips its own lookup with the run token; the grant itself never goes to Studio.
0 commit comments