8000 feat(automations): agents read and decline approvals, and never approve by adeelahmad · Pull Request #458 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(automations): agents read and decline approvals, and never approve - #458

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-gfulp2
Oct 16, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-gfulp2

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

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.

  • MCP: approvals lists 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 by id, or filters by status (pending by default, or any), origin or automation, a page at a time. On a namespace's own server it lists only that namespace's. decline_approval declines one by id and needs a write-scope token.
  • The assistant gets the same two tools. It sees automations' actions about the namespaces its conversation reads, and its own proposals in that conversation. After it has read text from outside Lens (the approvals' own summaries count), declining waits for the person's yes. An automation's agent doesn't get decline_approval.
  • No way for an agent to approve: there is no tool for it, and approvals.approve refuses any non-decline decision made via="agent", however it gets there. Each approval's can says so (approve: false for agents).

How: approvals.brief gives one shape for an approval to agents (id, status, summary, automation, action, effect, params, why, expiry, decision, link, can). ai_tools and mcp_tools build both tools on it, and actions_ai leaves decline_approval out 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 tools approvals and decline_approval, with agents never approving". Parts 1 to 3 were #447, #455 and #457. Next: the /approvals page.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. (n/a: studio modules land under one release note)

Done questions (AGENTS.md)

  • Goal: part 4 of M8; merged on green CI.
  • Agents: this is the agent surface, over MCP and in the assistant. Approving is deliberately the person's (brief, AGENTS principle 7).
  • Zero setup: the tools are there on the existing MCP server and assistant.
  • Fewest clicks: "decline that" in chat does it.
  • Configurable: n/a, no new setting; MCP write scope already controls decline_approval.
  • Light: no new process or dependency.
  • Private and secure: a person's own approvals only, a namespace's alone on its server; declining after outside text waits for the person; agents can't approve.
  • Cost: no model call in the tools themselves.
  • User decides: approving stays the person's pick; declining after outside text asks first.
  • Upgrades: no change to stored data.
  • Honest: docs label it built; the page stays planned.
  • Tests (tests/api/test_approvals.py, test_mcp.py), docs (mcp.md, assistant.md, automations.md); no REST schema change.
  • Open: MCP; no new dependency.
  • Reported; nothing new for "refine later".

🤖 Generated with Claude Code

https://claude.ai/code/session_01VF3LK1DBx3dXX2b8c5T3cQ


Generated by Claude Code

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
@adeelahmad adeelahmad self-assigned this Oct 16, 2026
@adeelahmad
adeelahmad merged commit fe25655 into main Oct 16, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-gfulp2 branch October 16, 2026 01:52
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

0