# plan.reconcile

> For the complete documentation index, see [llms.txt](https://ensforge.com/llms.txt).

Records a transaction sent outside ensforge as a plan step's submission. Parameters, return value, errors and examples for plan.reconcile in @ensforge/sdk.

Source: https://ensforge.com/docs/reference/sdk/plan/reconcile

<ApiMeta kind="Read" stability="stable" since="1.0.0" source="packages/sdk/src/actions/plan/reconcile/index.ts#L54" batchable />

Records a transaction sent outside ensforge as a plan step's submission.

## When to use [#when-to-use]

Use when a step was sent from another device or the wallet lost track, so resuming does not send it again.

## Details [#details]

- The transaction must exist and come from the plan's account, or call one of the step's
  contracts.
- [`plan.resume`](/docs/reference/sdk/plan/resume) then waits for it instead of sending the step.

## Signature [#signature]

```ts
function reconcile(client: Like, options: reconcile.Options): Promise<reconcile.ReturnType>
```

Call it as `ens.plan.reconcile(options)` on a client, or `Actions.plan.reconcile(client, options)`.

`plan.reconcile.request(options)` builds a deferred read for `Actions.batch`. See [Look up many at once](/docs/sdk/look-up-many-at-once).

## Parameters [#parameters]

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` |  | Plan id. |
| `step` (required) | `string` |  | Step id the transaction submitted. |
| `hash` (required) | `Hex` |  | Transaction hash. |

## Returns [#returns]

Resolves to `Plan.Record`. The updated record.

| Field | Type | Description |
| --- | --- | --- |
| `plan` | `Plan` |  |
| `status` | `"pending" \| "completed" \| "failed"` | `pending` while steps remain, `completed` once every step is submitted. |
| `submitted` | `Readonly<globalThis.Record<string, readonly Hex[]>>` | Transaction hashes per submitted step id. |
| `bundles` | `Readonly<globalThis.Record<string, string>>` | EIP-5792 bundle id per step sent in a bundle. |
| `references` (optional) | `Readonly<globalThis.Record<string, string>>` | Route references per step sent through `via` (e.g. UserOperation hashes). |
| `error` (optional) | `string` | Message of the last failure. |
| `updatedAt` | `number` | Unix time in milliseconds. |

## Errors [#errors]

| Error | Codes | When |
| --- | --- | --- |
| [`NotFoundError`](/docs/reference/errors/not-found-error) | [`PLAN_NOT_FOUND`](/docs/reference/errors/PLAN_NOT_FOUND) | an unknown plan. |
| [`PlanError`](/docs/reference/errors/plan-error) | [`PLAN_INVALID`](/docs/reference/errors/PLAN_INVALID) | a saved plan cannot be read. |
| [`InvalidInputError`](/docs/reference/errors/invalid-input-error) | [`INVALID_RECORD_VALUE`](/docs/reference/errors/INVALID_RECORD_VALUE) | an unknown step or an unrelated transaction. |
| [`NetworkError`](/docs/reference/errors/network-error) | [`RPC_REQUEST_FAILED`](/docs/reference/errors/RPC_REQUEST_FAILED), [`RPC_TIMEOUT`](/docs/reference/errors/RPC_TIMEOUT), [`RATE_LIMITED`](/docs/reference/errors/RATE_LIMITED) | the RPC request fails. |

It can also fail with the errors every read can (`Errors.CommonError`: `ConfigError`, `ContractRevertError`, `InternalError`, `NetworkError`).

See [How errors work](/docs/sdk/errors-explained).

## Examples [#examples]

<Tabs groupId="api" items={["Client","Standalone","Effect"]} persist>
<Tab>
```ts title="Attaching a recovered hash"
const record = await ens.plan.reconcile({ id, step: "commit", hash })
```
</Tab>

<Tab>
```ts title="Attaching a recovered hash with a standalone call"
import { Actions } from "@ensforge/sdk"

const record = await Actions.plan.reconcile(publicClient, { id, step: "commit", hash })
```
</Tab>

<Tab>
```ts title="Attaching a recovered hash in an Effect program"
import { Actions } from "@ensforge/sdk/effect"

const record = yield* Actions.plan.reconcile(ens, { id, step: "commit", hash })
```
</Tab>
</Tabs>

## See also [#see-also]

- [`plan.resume`](/docs/reference/sdk/plan/resume) to continue the plan