# plan.get

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

Reads a saved plan and its progress. Parameters, return value, errors and examples for plan.get in @ensforge/sdk. Options, errors and examples for plan.get.

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

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

Reads a saved plan and its progress.

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

Use to show where a registration, migration or other multi-step write stands.

## Details [#details]

- Every write saves its plan to the client's `storage` as it sends.
- `null` when no plan has the id (memory storage forgets plans on reload).

## Signature [#signature]

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

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

`plan.get.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, from `result.plan.id` or a failure's `context.planId`. |

## Returns [#returns]

Resolves to `Plan.Record | null`. The saved plan and its progress, or `null`.

| 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 |
| --- | --- | --- |
| [`InternalError`](/docs/reference/errors/internal-error) | [`UNEXPECTED`](/docs/reference/errors/UNEXPECTED) | the storage fails. |
| [`PlanError`](/docs/reference/errors/plan-error) | [`PLAN_INVALID`](/docs/reference/errors/PLAN_INVALID) | a saved plan cannot be read. |
| [`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="Reading a plan"
const record = await ens.plan.get({ id: planId })
```
</Tab>

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

const record = await Actions.plan.get(publicClient, { id: planId })
```
</Tab>

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

const record = yield* Actions.plan.get(ens, { id: planId })
```
</Tab>
</Tabs>

## See also [#see-also]

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