Agent Completions 403 insufficient_scope: an older key needs replacing

POST /v1/agent/completions returns 403 insufficient_scope for a key that predates Agent Completions or a service-account key. How to tell which and replace it.

4 min readSume
All posts

If a new tool call to POST /v1/agent/completions answers 403 insufficient_scope, the key probably predates Agent Completions. Sume's docs say keys created before the feature shipped do not carry agent_completions:read or agent_completions:write, and scopes cannot be added to an existing key. Create a new key in the dashboard, switch your server to it, and retire the old one. A service-account key fails with the same status but a different reason.

Two causes, one status

The Agent Completions page describes both. An older key fails every request with 403 insufficient_scope. A service-account key fails with 403 insufficient_scope too, but details.reason is service_account_agent_completions_unsupported. Read the details object before you rotate anything.

Telling the 403s apart (read 2026-10-04)
SignalCauseFix
No details.reason, key is oldKey predates the scopesCreate a new user key
service_account_agent_completions_unsupportedService-account keyUse a user-owned key for this endpoint
MCP insufficient_scope insteadOAuth session without mcp:writeGrant write at consent or use a key

Rotate safely

  • Create the new key at the API keys page in the dashboard and store it in your secret manager under a new name.
  • Deploy the new name to the service that hosts your model's tool handler, then send one cheap test with a low cap such as 1 dollar.
  • Check that the first receipt is a 202 with a run id.
  • Delete the old key only after traffic has moved, and rotate it immediately if it ever appeared in a log or chat.

The same trap elsewhere

Schedule API runs have the same pattern: keys from before the API-call trigger lack actions:read and actions:write; see Advanced: run a schedule via API. It is worth issuing one new key per integration so scopes are not a surprise later. Authentication covers key creation, and Safe automation covers what to keep out of logs.

Hosted MCP behaves differently: an OAuth token is not a Sume API key, and sume login does not broker MCP tokens, per the MCP OAuth page. Do not mint an API key for an MCP client just to silence a 403; add mcp:write at consent if the task really needs it.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume