Skip to content

Troubleshoot phases

Diagnose failed phase builds, blocked edits, rejected captures, and uncertain saves.

Build with agents
On this page

Use this guide when a phase build, edit, save, or deletion fails. For operation syntax and parameters, see the phase API reference.

Start with read-only checks in your local terminal: tsh phase ls --format=json shows your phases; tsh beams ls shows build beams and their expiry. Use --all on phase listings only when you need all authorized phases. Keep the phase name, build beam identifier, reported error, and current saved image before changing anything.

Find the active build

Symptom Check / action
Add/edit returned but no ready image Check the particular build with tsh phase ls; interactive builds need a snapshot
Edit refused because a build is active Reconnect with tsh beams ssh <build-beam>; do not start another replacement
Snapshot descendant prevents edit Fork the saved image into a new independent phase; see fork restrictions
Parent is blocked/failed Keep using a prior successful image if available; repair the parent and wait for refresh
Wait timed out The build continues; inspect status before retrying creation

Check the actual build deadline with tsh beams ls. Disconnecting with exit or Ctrl-D does not save files or end the build. Removing the build beam or letting it expire discards unsaved changes.

Resolve rejected captures

Read the rejected path list before retrying. Interactive snapshots normally save allowed changes under /home; system files belong in command or copy configuration. Ancestor command builds can reserve home paths too. See filesystem capture rules.

Use tsh phase snapshot --force only if you deliberately want to omit the rejected changes. It does not remove those files from the running beam; the omitted changes are absent from the saved image and disappear when the beam ends. Move needed changes into an appropriate configuration rather than forcing them away. Check saved paths for credentials before any capture.

Verify an uncertain save

If saving fails after upload or a connection loss, publication may already have succeeded. Read the current phase, its published image, and generation before another save. Keep the build beam until you have verified the result. Do not treat an uploaded reference alone as proof of a saved phase.

These helpers explain diagnostic output inside a build beam. Use the normal tsh phase snapshot workflow for routine saves; do not rerun low-level helpers merely to check status.

Helper What its result means
beam-snapshot Captures/uploads and prints a reference; the upload is temporary unless publication accepts and retains it
beam-finalize Captures a final result and ends the build; the result must still be validated before saving
beam-abandon Ends without another capture; already-saved images remain

A failed or uncertain phase snapshot --final leaves the build available for diagnosis. Low-level publication does not end the build. A snapshot reference must match the target’s parent and provenance; it cannot transplant another phase’s snapshot into that target.

Inspect failed builds

For a failed command build:

  1. Read the reported error and tsh phase ls-failed output. Add --all only when inspecting another authorized owner’s phases.
  2. Use the inspection command printed in the failure while its image is available. Failed rebuild snapshots are limited to three recent entries; estimated expiry is normally 24 hours after failure.
  3. Read /var/log/beam/build.log in the inspection beam. Inspect startup failures with beamctl logs <service-name> where applicable.
  4. Fix the command or service configuration, then reapply it. If application stopped partway through a multi-stage file, completed stages remain saved; it is not transactional.

An inspection beam cannot save or fork its filesystem back. A previous successful phase image stays usable when one exists. If the failed image has expired, use the remaining status/error information; do not assume the registry retains an indefinite archive.

Check region and identity

Symptom Check / action
Region mismatch Use the original placement; neither changing proxies nor supplying a digest migrates images

Do not weaken key protection, embed private keys in a phase, or assume ownership bypasses resource rules.

Retry without starting duplicate work

After an ambiguous failure, another request could start a second build. First read the phase and active build, then reconnect or wait when the original operation exists.

Deletion can fail because dependent phases still use the target as a parent. Remove those dependents first. After a concurrent-change error, read the target again: deletion may already have taken effect.

Do not retry an entire configuration blindly after a partial failure. Check which stages completed and which build is still active, fix the failing input, and then use the normal apply workflow. Preserve useful build state until the result is clear.

Search docs

Loading search and AI…

Skills

Install all available skills. All Beams and Teleport skills are hosted in our OSS Teleport repository.

npx skills add https://github.com/gravitational/teleport