# X_JOB_TENANT_MISMATCH

## Means

a job's payload names an org other than the tenant it runs under

## Typical cause

an enqueue whose `tenant(input)` names another org than its `tenantId` or the acting user's; a queued row refused at its run for the same reason; a webhook delivery's orgId, or the actor an agentJob resolved, outside the job's declared tenant

## Fix

`<job>.enqueue(input)` from an actor of the org the payload names, or inside `crossTenant('<why>', () => <job>.enqueue(input))` by an actor holding `tenancy:cross`; for an `agentJob`, load the actor in its `actor` under the job's own tenant. A queued row that names the wrong org is dead: `x jobs list --name <job> --state dead --json`, re-enqueue it, never retry it

[Jobs](/error-codes#jobs)
