Skip to content

Updater and doctor

This page owns the user-facing maintenance command surface: doctor, update/upgrade, install, native auto-updater state, update failure modes, and hosted/remote operational preflight signals.

Use Diagnostics and debug logs for local log/debug evidence, Telemetry and tracing for emitted telemetry/export sinks, and Feature gates reference for updater-related gates.

Source anchors

Semantic aliasSourceApproximate locationString or symbolMeaning
NativeUpdaterStartEventcli.jsline ~9355, byte 0xc257d7tengu_native_auto_updater_startUpdater entry telemetry.
NativeUpdaterLockContentionEventcli.jsline ~9355, byte 0xc25b5ctengu_native_auto_updater_lock_contentionUpdater lock/contention telemetry.
NativeUpdaterFailureLogcli.jsline ~9355, byte 0xc25d3eNative auto-updater failedNative updater failure logging path.
NativeUpdaterFailureEventcli.jsline ~9355, byte 0xc25d87tengu_native_auto_updater_failUpdater failure classification.
NativeUpdaterSuccessEventcli.jsline ~9355, byte 0xc25e2ctengu_native_auto_updater_successUpdater success telemetry.
AutoUpdateReleaseChannelcli.jsline ~185, byte 0x11d275auto-update (latest, stable, rc)Settings-driven release channel selection.
UpdaterPermissionPreflightcli.jsline ~2741, byte 0x73879eInsufficient permissions for auto-updatesDoctor-style updater permission preflight.
AutoUpdaterStatusMachinecli.jsline ~433, byte 0x302b03autoUpdaterStatus: migrated, installed, disabled, enabledUpdater install-kind/state machine.
DoctorDiagnosticsScreencli.jsline ~605, byte 0x38fcfe/doctor diagnostics screenInteractive diagnostics/doctor surface.
DoctorCommandcli.jsline ~19550, byte 0xdcd0b4H.command("doctor")Auto-updater health check command.
UpdateCommandFamilycli.jsline ~19550, byte 0xdcd261H.command("update").alias("upgrade")Update/upgrade command family.

Command surface

CommandRole
doctorRuns diagnostics/health checks, including auto-updater and environment preflights.
update / upgradeChecks for updates and installs when available.
install [target]Installs a stable/latest/specific native build.
ultrareview [target]Cloud-hosted multi-agent review preflight and execution path; operationally adjacent but owned by agents/automation.

Native updater model

flowchart TD
Command[doctor/update/install] --> State[autoUpdaterStatus]
State --> Channel[auto-update channel]
Channel --> Updater[native auto-updater]
Updater --> Lock[lock / contention]
Updater --> Result{result}
Result -->|success| Success[tengu_native_auto_updater_success]
Result -->|fail| Failure[tengu_native_auto_updater_fail]
Failure --> Existing[existing install remains usable]
Updater concernObservable evidenceInterpretation
StateautoUpdaterStatus: migrated, installed, disabled, enabledRuntime tracks install/update status separately from normal model turns.
Channelauto-update with latest, stable, rcSettings can shape release channel.
Lockingtengu_native_auto_updater_lock_contentionMultiple invocations are coordinated; a second updater should not race the first.
FailureNative auto-updater failed, tengu_native_auto_updater_failFailures are classified/logged while preserving existing install usability.
Successtengu_native_auto_updater_successSuccessful update path emits operational evidence.

Doctor behavior

The doctor command is the canonical user-facing diagnostics surface. It can check updater state and environment issues; the older mixed ops docs noted that doctor also warns that workspace trust is skipped and stdio MCP servers from .mcp.json may be spawned for health checks.

Use Diagnostics and debug logs for the log/debug evidence generated around these checks.

Hosted review and operational preflights

The bundle also includes hosted multi-agent review strings and preflight calls around ultrareview, plus remote-session tokens documented in the sessions chapter. Those surfaces are operationally related because they use cloud/hosted control planes rather than only local TUI state.

Failure modes

FailureBehavior
Updater times out, checksum fails, or binary not foundClassified failure event emitted; existing install remains usable.
Updater lock already held by another processLock-contention event; no second updater runs.
Auto-update permissions are insufficientDoctor-style preflight reports a fix-up message instead of silently failing.
Hosted review preflight rejectsUX surfaces the result; local workflow is not blocked.

Created and maintained by Yingting Huang.