Saved plans and recovery
Review one durable plan, understand which run wrote files, and recover without discarding unrelated work.
These guides use CLI 0.14.4 and the extension 0.7.2 workflow. Install or update the CLI before starting. Confirm that polyglot start --help and polyglot wrap --help expose saved plans. In VS Code, use an extension build that includes Localize one screen and run Update CLI if your selected binary is older.
Download the extension below, then open the VS Code Command Palette and run Extensions: Install from VSIX. Select the downloaded file.
Plan ID and run ID
| Identity | Use it for |
|---|---|
| Plan ID | Inspect the complete proposed patch, apply its exact bytes and scope translation to its changed source keys. |
| Run ID | Inspect and recover the writes from a particular apply, preview or approved-pull operation. |
polyglot wrap --show <plan-id>
polyglot wrap --apply <plan-id>
polyglot runs --json
polyglot undo <run-id> --diffPlanning stores local review artifacts; it does not apply the patch. start can also create local configuration when an app has none. The journal records the plan-to-run association before the first mutation, so an interrupted editor can reconcile a committed apply even when it lost the final command output.
When a plan becomes stale
A saved plan is bound to its source/configuration/dependency inputs, workspace scope and exact CLI binary. A rebuilt or upgraded executable can invalidate an earlier plan even when its version text is unchanged. Change inputs deliberately, then generate and review a fresh plan. An old preview is not permission to apply a newly computed patch.
polyglot start --file src/app/page.tsx --lang fr
polyglot wrap --show <new-plan-id>
polyglot wrap --apply <new-plan-id>Recover one run
- Save editor drafts first. Run runs from the same app that started the operation and locate the intended run.
- Inspect undo <run-id> --diff. Review source, catalog, configuration and parent dependency files together.
- Run undo <run-id> only after the recovery diff is understood. Unrelated files remain untouched.
- If recovery reports a conflict, preserve your newer work and compare it with the recorded original and expected output. Reconcile the file manually; do not force a blanket checkout.
Omitting the run ID selects the latest run with changes. Prefer an explicit ID when several applies, previews or approved pulls have occurred. Recovery records are local; undo does not revoke a hosted approval, refund translation requests, or reverse a merged remote PR.
Failure and cancellation
An unsuccessful process can still have committed changes. Read the execution/commit state and journal before retrying. Pending recovery blocks further mutations where they could damage an uncertain run. VS Code refreshes this durable state instead of treating lost output as proof that nothing changed.
If an editor document becomes dirty during a guarded operation, the extension cancels the operation and preserves your draft. Save deliberately, inspect the recovery diff and replan as needed. Preview permits normal editing after launch; its journal then checks those later disk edits before cleanup.
Monorepos and dependency files
Use doctor --apps, then change to the selected app root. Plans may include required parent manifests and lockfiles; sibling apps in the same declared workspace share a recovery lock. A file-scoped plan can therefore contain companion changes outside that file.
If dependency installation stops before its output is recorded, Polyglot preserves original bytes and refuses to guess which later output it owns. Review the conflicting dependency file. Undo restores versioned inputs; reinstall to rebuild node_modules or native caches. Application lifecycle scripts are disabled during Polyglot’s dependency installation; review and run required project setup explicitly.
Retention and portability
Completed local records are retained for at most 30 days, 20 records and 256 MiB per app; the newest record may exceed the size budget. Incomplete recovery records remain until resolved. Records contain source and dependency bytes, so keep them private. They are tied to their app/workspace and executable; they are not a portable team patch format.
Use Git commits for long-term history and review remote publication separately. A successful local undo is not evidence that your deployed application or a remote branch changed.