Fix a live incident with a patch
Patch mode is built for firefighting. It only creates or updates the resources you name and never destroys anything, so the blast radius is exactly the resource or two you are touching. See Apply modes for the full contrast with reconcile.- CLI
- AI assistants
1
Write a focused forma
Include only the resources you are adding or fixing. The stack and target
must already exist:
2
Apply the fix
formae shows the plan and asks you to confirm, then streams the run in a
live view:Add
formae apply · patch hotfix.pkl
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+ 1 create
▌ Resources
Operation ▲ Label Type
+ create incident-logs AWS::S3::Bucket
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
↑↓: select space: expand →←: column s: sort y: confirm q: abort This operation will create 1 resource(s). Do
you want to continue? (y/N) ?: help
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+ 1 create
▌ Resources
Operation ▲ Label Type
+ create incident-logs AWS::S3::Bucket
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
↑↓: select space: expand →←: column s: sort y: confirm q: abort This operation will create 1 resource(s). Do
you want to continue? (y/N) ?: help
--yes to skip the confirmation prompt when you are certain and need
speed.Settle up after the fix
A patch updates the cloud without automatically changing the reconcile baseline. Once the incident is over, review the stack’s out-of-band changes and choose whether to absorb or revert each actionable change. Other out-of-band changes in that stack are reviewed at the same time.Absorb a change worth keeping
Tell your assistant:Keep the incident-logs bucket in production. Review any other out-of-band changes with me.The assistant retrieves the stack, presents the remaining choices, and simulates the combined reconcile. Once you confirm it, formae records the bucket as desired intent. A pure absorption does not need to create the bucket again. If you maintain a project, the assistant updates that selected project’s Pkl source afterward. If you do not, the next session retrieves the accepted stack from formae. The decision does not depend on keeping the incident’s temporary files. With the CLI, reconcile your complete stack declaration and select absorb for the patched resource in the review of out-of-band changes:
Revert a temporary workaround
Tell your assistant:The incident-logs bucket was temporary. Revert that patch in production.Reverting a newly created resource may delete it. The assistant shows that operation in the final simulation and asks for confirmation. Resolve other out-of-band changes that need a decision in the affected stack as part of the same review. In the CLI review of out-of-band changes, choose revert for the patched resource. The existing
--force option is still available when you deliberately want to overwrite all
out-of-band changes with your declaration; simulate that complete plan first:
Remove a resource after its creation failed
A failed creation remains part of the stack’s desired state. If formae has no managed observation of the resource, omitting it from your next reconcile cannot establish that it is absent from the cloud. formae reports the unresolved resource and failed command instead of silently accepting the omission. Inspect the failed command and investigate the cloud outcome. Recover or reapply the resource’s declaration, then reconcile its removal once formae can manage it. You can still retrieve the desired stack to recover that declaration. Discovery can help investigate, but does not by itself remove the recorded intent, and--force does not bypass this limitation.
See also
- Apply modes: patch versus reconcile, and how out-of-band changes is detected and resolved.
- Synchronization: how formae detects the out-of-band changes a patch introduces.
- Everyday changes: the routine inspect, change, and tear-down operations.
- Troubleshoot a failed command: read the detailed status layout to see which resource broke and why.
- Cancel a running command: stop an in-progress command without leaving orphaned resources.
- CLI reference: full flags for
apply,cancel,status,inventory, andextract.

