FixesUpdated 23 Oct 20261 min read

"Transaction contains a duplicate instruction that is not allowed" fix

The fix

The transaction includes the same compute budget instruction twice, typically because an SDK added its own compute unit limit or price and the app added another.

What the error means

Transaction contains a duplicate instruction (N) that is not allowed

The transaction includes the same compute budget instruction twice, typically because an SDK added its own compute unit limit or price and the app added another.

Where it comes fromSolana runtime (transaction error)
CodeDuplicateInstruction

How to fix it

  1. Remove one of the SetComputeUnitLimit or SetComputeUnitPrice instructions so each appears once.
  2. If you build transactions with a protocol SDK, check whether it already adds compute budget instructions before adding yours.
  3. Rebuild, simulate and resend.

If that is not it

  • If no compute budget instruction is duplicated, check the instruction index in the error to see which one repeats.

More fixes: how to decode any Solana error code and why Solana transactions fail.

Source

Error text and code from Solana SDK transaction and instruction error definitions (anza-xyz/solana-sdk), read on 24 October 2026.

Questions people ask

Which instructions cannot be duplicated?

Compute budget instructions, such as the compute unit limit and price, may appear only once per transaction.

Where have you seen this?

Building Meteora liquidity transactions, where the SDK adds its own compute budget instructions.

"Transaction contains a duplicate instruction that is not