Skip to content

Troubleshooting

Every failure MAP produces carries a typed error code. Find yours below: cause first, then the fix.

Policy decisions (not errors)

These are policy outcomes, not bugs. Your action was evaluated and decided:

CodeCauseFix
policy_deniedA deny rule matchedRead reason and policy_checks in the receipt; adjust the action or the rule
approval_requiredA rule returned require_approvalCall POST /approve with the approval reference, or wire onApprovalRequired
approval_deniedA human rejected the approvalExpected path - surface it to the requester
approval_expiredThe approval window lapsed before useRe-request approval; shorten nothing, lengthen approval_timeout if legitimate

Approval lifecycle

CodeCauseFix
approval_expiredReference used after expiryDispatch again for a fresh reference
idempotency_conflictSame idempotency key replayed with a different payloadReuse the exact original payload, or mint a new key

Identity and tokens

CodeCauseFix
invalid_delegation_tokenMalformed or tampered tokenRe-issue from the delegating agent
token_expiredToken past its time windowRe-issue; check clock skew beyond the ±5 minute signing window
token_invalid_signatureSignature doesn't verifyWrong key, wrong kid, or canonicalization drift - compare against the conformance fixtures
token_missing_scopeToken lacks the capability being attemptedRe-issue with the capability in scope
tenant_mismatchRequest tenant differs from token/resource tenantScope the request to one tenant; enable MAP_REQUIRE_TENANT=true to fail fast
unauthorized / forbiddenMissing or insufficient credentialsCheck signing secret, MAP_ADMIN_TOKEN for admin routes

Agents and capabilities

CodeCauseFix
agent_not_foundUnknown target_agentGET /agents to list registered agents
agent_disabledAgent administratively disabledRe-enable or route to a standby agent
capability_not_foundNo handler for the capabilityRegister it (agent.can(...)) or fix the name
capability_disabledHandler registered but disabledRe-enable
resource_not_foundReferenced task/receipt/agent ID doesn't existVerify the ID; check tenant scoping

Schema and protocol

CodeCauseFix
schema_validation_failedRequest body fails MAP JSON SchemaValidate locally first; check requested_schema_version
schema_version_unsupportedServer doesn't speak the requested versionNegotiate: omit the version or use a supported one
schema_negotiation_failedNo common version foundUpgrade the older side
invalid_requestMalformed envelope or missing fieldstask_id, target_agent, and intent are required

Reliability

CodeCauseFix
rate_limit_exceededToo many dispatchesBack off; batch with dispatchBatch; raise limits server-side
request_timeoutHandler or downstream exceeded deadlinePrefer delivery_mode: 'async' for long tasks; poll or stream status
internal_errorServer-side failureCheck server logs and /health; dead-lettered async tasks are inspectable and replayable

Still stuck?

  • Run the demo locally to isolate client vs server issues
  • Query GET /audit-events - every decision leaves a signed trail showing which rule fired
  • Check the conformance harness to verify your client against the reference contract

Released under the Apache 2.0 License.