Skip to content

feat(agents): agent action webhooks for every decision; approval routes answer 403 when disabled - #1185

Merged
kphurley7 merged 1 commit into
mainfrom
kph/muse-spec-g-agent-approvals
Oct 16, 2026
Merged

kphurley7 merged 1 commit into
mainfrom
kph/muse-spec-g-agent-approvals

Conversation

@kphurley7

Copy link
Copy Markdown
Contributor

Agent action webhooks for every decision.

  • AgentActionWebhook.type becomes AgentActionWebhookEventType, which adds AGENT_ACTION.APPROVED, AGENT_ACTION.REJECTED and AGENT_ACTION.FAILED beside PENDING_APPROVAL; WebhookType lists the three new events.
  • GET /agents/approvals and the approve and reject operations document a 403 when the Agents API is not enabled.

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Oct 16, 2026 3:43pm UTC
grid-flow-builder Ignored Ignored Preview Oct 16, 2026 3:43pm UTC
grid-wallet-demo Ignored Ignored Preview Oct 16, 2026 3:43pm UTC

Request Review

@kphurley7
kphurley7 force-pushed the kph/muse-spec-g-agent-approvals branch from f92185b to 5e69104 Compare October 14, 2026 17:37
type: string
enum:
- AGENT_ACTION.PENDING_APPROVAL
- AGENT_ACTION.APPROVED

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AUTO actions are created already APPROVED, so this never fires for them. could AUTO fire APPROVED on create too? then clients can handle every action the same way without a special case for AUTO, and a later FAILED won't be for an action they never heard about

@k15z

k15z commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

webhooks/agent-action.yaml still calls itself the "pending approval" webhook and says it fires when an action needs approval. probably wants updating now that it carries all four events

@ls-bolt

ls-bolt Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

🦣 Congratulations @k15z - your substantive review earned a Giant short-faced kangaroo! (rare)

Forward-facing eyes and a single large toe distinguished Australia's largest known kangaroo.

View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/k15z?section=ice-age

@kphurley7
kphurley7 force-pushed the kph/muse-spec-g-agent-approvals branch from 5e69104 to 0db4265 Compare October 14, 2026 18:13
@kphurley7
kphurley7 force-pushed the kph/muse-spec-g-agent-approvals branch from 0db4265 to d4e0c58 Compare October 15, 2026 04:32
@kphurley7
kphurley7 added this pull request to stack #1188 October 15, 2026 18:49
@kphurley7
kphurley7 force-pushed the kph/muse-spec-g-agent-approvals branch 2 times, most recently from 86a624e to 3426e3b Compare October 16, 2026 15:19
@kphurley7
kphurley7 marked this pull request as ready for review October 16, 2026 15:20
@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect the documented contract for the agent approval workflow.

The PR appears safe to merge, with a non-blocking update needed to the webhook instructions.

Findings

  1. P2 Finished actions still prompt approval ▶
Fix with agent prompt
### Issue 1
openapi/components/schemas/webhooks/AgentActionWebhookEventType.yaml:4-6
The new events include final outcomes, but `openapi/webhooks/agent-action.yaml` still describes only pending approvals. It tells developers to show an approval screen and call approve or reject. Those instructions do not apply to `AGENT_ACTION.APPROVED`, `AGENT_ACTION.REJECTED`, or `AGENT_ACTION.FAILED`.

Update the webhook description to distinguish pending requests from final outcomes and explain how callers should handle each.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Extends agent action webhook types and documents disabled-feature responses.

  • Agent action webhooks can name pending, approved, rejected, and failed events.
  • Approval routes describe a 403 response when the Agents API is disabled.

Reviews (1) · Last reviewed commit: "feat(agents): agent action webhooks for ..." · Reviewed by Greptile

Comment on lines +4 to +6
- AGENT_ACTION.APPROVED
- AGENT_ACTION.REJECTED
- AGENT_ACTION.FAILED

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Finished actions still prompt approval

The new events include final outcomes, but openapi/webhooks/agent-action.yaml still describes only pending approvals. It tells developers to show an approval screen and call approve or reject. Those instructions do not apply to AGENT_ACTION.APPROVED, AGENT_ACTION.REJECTED, or AGENT_ACTION.FAILED.

Update the webhook description to distinguish pending requests from final outcomes and explain how callers should handle each.

Knowledge Base Used: Webhooks and event delivery

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/webhooks/AgentActionWebhookEventType.yaml
Line: 4-6

Comment:
**Finished actions still prompt approval**

The new events include final outcomes, but `openapi/webhooks/agent-action.yaml` still describes only pending approvals. It tells developers to show an approval screen and call approve or reject. Those instructions do not apply to `AGENT_ACTION.APPROVED`, `AGENT_ACTION.REJECTED`, or `AGENT_ACTION.FAILED`.

Update the webhook description to distinguish pending requests from final outcomes and explain how callers should handle each.

**Knowledge Base Used:** [Webhooks and event delivery](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/webhooks-api.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Base automatically changed from kph/muse-spec-f-agent-execute to main October 16, 2026 15:42
…es answer 403 when disabled

AgentActionWebhook's type becomes AgentActionWebhookEventType, which adds
AGENT_ACTION.APPROVED, AGENT_ACTION.REJECTED and AGENT_ACTION.FAILED beside
PENDING_APPROVAL, and WebhookType lists the three new events. GET
/agents/approvals and the approve and reject operations answer 403 when the
Agents API is not enabled for the platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeBuC5ym3AR1ZJ6eocSFGT
@kphurley7
kphurley7 force-pushed the kph/muse-spec-g-agent-approvals branch from 3426e3b to 813653c Compare October 16, 2026 15:42
@mintlify

mintlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Oct 16, 2026, 3:44 PM

@kphurley7
kphurley7 merged commit 066480c into main Oct 16, 2026
8 checks passed
@kphurley7
kphurley7 deleted the kph/muse-spec-g-agent-approvals branch October 16, 2026 15:47
kphurley7 added a commit that referenced this pull request Oct 16, 2026
Agent quote operations and `AgentAction.quote` return plain `Quote`
again, and `AgentQuote` is removed.

#1183 dropped `AgentQuote` because it added nothing to `Quote`, but
#1184 and #1185 merged from branches made before that change and brought
it back. This only reverts those three references and deletes the
schema; there is no other change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging - mintlify — 813653c7 Deployed Oct 16, 2026 by mintlify[bot]
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