Repository navigation
feat(automations): agents read and decline approvals, and never approve - #458
Merged
Merged
Conversation
MCP and the assistant get approvals (list, read) and decline_approval for the person's own approvals; there is no tool to approve, and an agent's approve is refused however it reaches it. The assistant sees automations' approvals about the namespaces its conversation reads and its own proposals there, and declining asks first once it has read outside text. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VF3LK1DBx3dXX2b8c5T3cQ
19 of 22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: an agent could list and decline approvals only over the REST API. MCP and the assistant had no approval tools, and nothing in them stopped an agent's approve if one found a way to send it.
After: workflow studio M8, part 4 of 5.
approvalslists what waits for your pick, newest first. Each comes with what it would do, why, when it expires, its link and what an agent may do (can). It reads one byid, or filters bystatus(pending by default, orany),originorautomation, a page at a time. On a namespace's own server it lists only that namespace's.decline_approvaldeclines one by id and needs a write-scope token.decline_approval.approvals.approverefuses any non-decline decision madevia="agent", however it gets there. Each approval'scansays so (approve: falsefor agents).How:
approvals.briefgives one shape for an approval to agents (id, status, summary, automation, action, effect, params, why, expiry, decision, link,can).ai_toolsandmcp_toolsbuild both tools on it, andactions_aileavesdecline_approvalout of automations' agents.Motivation and Context
Adeel's workflow studio, module M8 (approvals inbox), brief in the project's
workflow-studio/briefs/M8.md: "MCP and assistant toolsapprovalsanddecline_approval, with agents never approving". Parts 1 to 3 were #447, #455 and #457. Next: the/approvalspage.Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md. (n/a: studio modules land under one release note)Done questions (AGENTS.md)
decline_approval.tests/api/test_approvals.py,test_mcp.py), docs (mcp.md,assistant.md,automations.md); no REST schema change.🤖 Generated with Claude Code
https://claude.ai/code/session_01VF3LK1DBx3dXX2b8c5T3cQ
Generated by Claude Code