Skip to content

Add agent card hand-over - #1239

Merged
kphurley7 merged 2 commits into
mainfrom
kph/agents-card-handover
Oct 26, 2026
Merged

kphurley7 merged 2 commits into
mainfrom
kph/agents-card-handover

Conversation

@kphurley7

@kphurley7 kphurley7 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Adds POST /agents/{agentId}/card-handover: moves the customer's standard card that was frozen when its previous agent was deleted (optionally only the card of a given previousAgentId) to this live agent of the same customer, which must hold MANAGE_CARDS, after the same checks as card issuance, and lifts that freeze. Returns the card, or 204 when there is nothing to hand over. Cards frozen for any other reason, and single-use purchase cards, are never moved.

Needed so a customer who reconnects their AI app keeps their card instead of having it stranded on the deleted agent.

A card Grid froze because its agent was deleted still counts against the
customer's card limit, so a customer who reconnects agent software can
neither use that card nor be issued another. This operation moves such a
standard card to another live agent of the same customer and lifts the
deletion freeze. Cards frozen for any other reason and purchase cards are
left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSkWUSAw9qMByQhWaFyv9B
@vercel

vercel Bot commented Oct 26, 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 26, 2026 11:09pm UTC
grid-flow-builder Ignored Ignored Preview Oct 26, 2026 11:09pm UTC
grid-wallet-demo Ignored Ignored Preview Oct 26, 2026 11:09pm UTC

Request Review

@mintlify

mintlify Bot commented Oct 26, 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 26, 2026, 11:10 PM

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The contract changes appear safe to merge.

Summary

Adds POST /agents/{agentId}/card-handover to the modular contract and both published bundles.

  • The API documents how platforms hand a deleted agent's card to a live agent.

No actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Platform calls card-handover"] --> B{"Target agent meets requirements?"}
  B -->|No| C["Return documented error"]
  B -->|Yes| D{"Eligible standard card exists?"}
  D -->|No| E["204: Nothing to hand over"]
  D -->|Yes| F["Select most recently issued card"]
  F --> G{"Card can be unfrozen?"}
  G -->|No| H["409: Invalid state transition"]
  G -->|Yes| I["Move card, unfreeze it, and emit status webhook"]
  I --> J["200: Return card"]
Loading

Reviews (1) · Last reviewed commit: "Add POST /agents/{agentId}/card-handover" · Reviewed by Greptile

previousAgentId lets a platform hand over only the card of the deleted agent
the customer's previous connection held, so a card never moves to a
different piece of agent software on its own. The hand-over now also
requires what issuance does (individual customer, approved KYC, accepted
cardholder agreement), returns a card awaiting funding authorization as
PENDING_AUTH, and skips a card that was still provisioning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSkWUSAw9qMByQhWaFyv9B
@kphurley7
kphurley7 disabled auto-merge October 26, 2026 23:26
@kphurley7
kphurley7 merged commit 4f1963b into main Oct 26, 2026
8 checks passed
@kphurley7
kphurley7 deleted the kph/agents-card-handover branch October 26, 2026 23:26

This branch was successfully deployed

1 active deployment
staging - mintlify — e274ca70 Deployed Oct 26, 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