{
  "ensure-workspace": {
    "status": "failed",
    "output": "=== Ensure workspace runtime (WSL2 Ubuntu) ===\n=== Ensure WSL2 subsystem is responsive (auto-recovers if wedged) ===\n  $ wsl --status\n    | Default Distribution: Adom-Workspace\n    | Default Version: 2\n    | WSL1 is not supported with your current machine configuration.\n    | Please enable the \"Windows Subsystem for Linux\" optional component to use WSL1.\n  ✓ `wsl --status` ok (0s)\n  ✓ WSL2 subsystem is responsive\nChecking WSL2 prerequisites (wsl --status)...\n  ✓ WSL2 is installed and ready\n=== Ensure WSL2 subsystem is responsive (auto-recovers if wedged) ===\n  $ wsl --status\n    | Default Distribution: Adom-Workspace\n    | Default Version: 2\n    | WSL1 is not supported with your current machine configuration.\n    | Please enable the \"Windows Subsystem for Linux\" optional component to use WSL1.\n  ✓ `wsl --status` ok (0s)\n  ✓ WSL2 subsystem is responsive\n  ✓ distro already registered + up to date\n  → booting the workspace (systemd PID 1), one blocking wait for boot to finish (~10-30s)…\n  ── systemd boot log ──\n    │ [    2.470910] winvm systemd[1]: systemd-machine-id-commit.service - Commit a transient machine-id on disk was skipped because of an unmet condition check (ConditionPathIsMountPoint=/etc/machine-id).\n    │ [    2.470973] winvm systemd[1]: systemd-update-done.service - Update is Completed was skipped because no trigger condition checks were met.\n    │ [    2.471871] winvm systemd[1]: Starting systemd-update-utmp.service - Record System Boot/Shutdown in UTMP...\n    │ [    2.482235] winvm systemd[1]: Finished systemd-update-utmp.service - Record System Boot/Shutdown in UTMP.\n    │ [    2.483432] winvm systemd[1]: Reached target sysinit.target - System Initialization.\n    │ [    2.485184] winvm systemd[1]: Started apt-daily.timer - Daily apt download activities.\n    │ [    2.485611] winvm systemd[1]: Started apt-daily-upgrade.timer - Daily apt upgrade and clean activities.\n    │ [    2.485944] winvm systemd[1]: Started dpkg-db-backup.timer - Daily dpkg database backup timer.\n    │ [    2.486307] winvm systemd[1]: Started e2scrub_all.timer - Periodic ext4 Online Metadata Check for All Filesystems.\n    │ [    2.486579] winvm systemd[1]: fstrim.timer - Discard unused filesystem blocks once a week was skipped because of an unmet condition check (ConditionVirtualization=!container).\n    │ [    2.486619] winvm systemd[1]: Started motd-news.timer - Message of the Day.\n    │ [    2.486887] winvm systemd[1]: Started systemd-tmpfiles-clean.timer - Daily Cleanup of Temporary Directories.\n    │ [    2.487153] winvm systemd[1]: Reached target timers.target - Timer Units.\n    │ [    2.487432] winvm systemd[1]: systemd-pcrphase-sysinit.service - TPM2 PCR Barrier (Initialization) was skipped because of an unmet condition check (ConditionSecurity=measured-uki).\n    │ [    2.487497] winvm systemd[1]: Reached target basic.target - Basic System.\n    │ [    2.487867] winvm systemd[1]: adom-distro-id.service - Generate the per-import Adom distro identity marker was skipped because of an unmet condition check (ConditionPathExists=!/etc/adom-distro-id).\n    │ [    2.488853] winvm systemd[1]: Starting adom-relay.service - Adom Bridge relay (adom-bridge-cli serve) - the bridge AB/HD connect back to...\n    │ [    2.489887] winvm systemd[1]: Starting adom-shotlog.service - Adom Shotlog (screenshot log viewer, port 8820)...\n    │ [    2.490991] winvm systemd[1]: Starting code-server.service - Adom code-server (Hydrogen Desktop workspace editor)...\n    │ [    2.492589] winvm systemd[1]: Started cron.service - Regular background program processing daemon.\n    │ [    2.497195] winvm (cron)[78]: cron.service: Referenced but unset environment variable evaluates to an empty string: EXTRA_OPTS\n    │ [    2.498288] winvm systemd[1]: Starting e2scrub_reap.service - Remove Stale Online ext4 Metadata Check Snapshots...\n    │ [    2.499570] winvm cron[78]: (CRON) INFO (pidfile fd = 3)\n    │ [    2.502441] winvm cron[78]: (CRON) INFO (Running @reboot jobs)\n    │ [    2.503991] winvm systemd[1]: Starting getty-static.service - getty on tty2-tty6 if dbus and logind are not available...\n    │ [    2.504562] winvm systemd[1]: systemd-logind.service - User Login Management was skipped because no trigger condition checks were met.\n    │ [    2.504631] winvm systemd[1]: systemd-pcrphase.service - TPM2 PCR Barrier (User) was skipped because of an unmet condition check (ConditionSecurity=measured-uki).\n    │ [    2.506243] winvm systemd[1]: Starting systemd-user-sessions.service - Permit User Sessions...\n    │ [    2.507858] winvm systemd[1]: Starting wsl-mnt-guard.service - WSL Cross-Distribution Mount Guard...\n    │ [    2.509133] winvm systemd[1]: Started adom-shotlog.service - Adom Shotlog (screenshot log viewer, port 8820).\n    │ [    2.509509] winvm systemd[1]: Started code-server.service - Adom code-server (Hydrogen Desktop workspace editor).\n    │ [    2.511691] winvm systemd[1]: Started adom-relay.service - Adom Bridge relay (adom-bridge-cli serve) - the bridge AB/HD connect back to.\n    │ [    2.518825] winvm systemd[1]: Finished systemd-user-sessions.service - Permit User Sessions.\n    │ [    2.522423] winvm systemd[1]: Started [redacted] - Getty on tty1.\n    │ [    2.524563] winvm systemd[1]: Finished wsl-mnt-guard.service - WSL Cross-Distribution Mount Guard.\n    │ [    2.527977] winvm CRON[86]: pam_unix(cron:session): session opened for user adom(uid=1001) by adom(uid=0)\n    │ [    2.530443] winvm CRON[105]: (adom) CMD (python3 /home/adom/.local/share/adom/codex/runtime/manage.py ensure-watch >/dev/null 2>&1 # adom/codex runtime)\n    │ [    2.533204] winvm systemd[1]: Started [redacted] - Getty on tty2.\n    │ [    2.533268] winvm bash[76]: OK: Recovered 0 channel(s) from disk\n    │ [    2.533268] winvm bash[76]: OK: Retention active: max 200 shots/channel on disk (SHOTLOG_MAX_SHOTS), idle channels pruned after 30d (SHOTLOG_RETENTION_DAYS, 0=off)\n    │ [    2.533492] winvm CRON[85]: pam_unix(cron:session): session opened for user adom(uid=1001) by adom(uid=0)\n    │ [    2.533675] winvm CRON[108]: (adom) CMD (sleep 600; bash /home/adom/.adom/hooks/adom-core-update.sh >/dev/null 2>&1)\n    │ [    2.535165] winvm bash[76]: OK: read-hook verified: auto-capture of every image any AI Reads is active.\n    │ [    2.535165] winvm bash[76]: OK: Listening on 0.0.0.0:8820\n    │ [    2.539353] winvm systemd[1]: Started [redacted] - Getty on tty3.\n    │ [    2.539699] winvm bash[75]: note: this tool is now `adom-bridge`. You invoked the retired `adom-bridge-cli` alias, which still works and always will, but every example, hint and skill uses `adom-bridge` - prefer it in new calls and in anything you write down.\n    │ [    2.539699] winvm bash[75]: ┌─ adom-bridge relay (ws:8765 http:8766) ───────────────────────────\n    │ [    2.539699] winvm bash[75]: │ ⚠  RUNNING IN THE FOREGROUND — this relay STOPS when this shell / session ends.\n    │ [    2.539699] winvm bash[75]: │    In a container that means: when the session that launched it is torn down,\n    │ [    2.539699] winvm bash[75]: │    the relay dies, /proxy/8765/ returns HTTP 500, and EVERY connected desktop\n    │ [    2.539699] winvm bash[75]: │    falls into an endless \"Reconnecting in 30s\" loop until someone restarts it.\n    │ [    2.539699] winvm bash[75]: │\n    │ [    2.539699] winvm bash[75]: │ ✅ To make it SURVIVE the session AND self-heal, stop this and run instead:\n    │ [    2.539699] winvm bash[75]: │        adom-bridge serve --supervise\n    │ [    2.539699] winvm bash[75]: │    That detaches the relay from your session (reparented to init) and starts a\n    │ [    2.539699] winvm bash[75]: │    watchdog: it restarts the relay with backoff and TOASTS the connected\n    │ [    2.539699] winvm bash[75]: │    desktops (with the reason) whenever it has to. Stop later with:\n    │ [    2.539699] winvm bash[75]: │        adom-bridge serve --stop\n    │ [    2.539699] winvm bash[75]: │\n    │ [    2.539699] winvm bash[75]: │    (Foreground is fine for a quick local relay you'll sit and watch.)\n    │ [    2.539699] winvm bash[75]: └────────────────────────────────────────────────────────────────────────────\n    │ [    2.539699] winvm bash[75]: ┌─ SECURITY: this relay is using the DEFAULT development token ──────────────\n    │ [    2.539699] winvm bash[75]: │ The token is a well-known literal published in the adom-bridge docs, so\n    │ [    2.539699] winvm bash[75]: │ ANYONE who knows this relay's URL can join it and drive EVERY desktop\n    │ [    2.539699] winvm bash[75]: │ connected to it. If a connected desktop controls real hardware, treat\n    │ [    2.539699] winvm bash[75]: │ this as an open door.\n    │ [    2.539699] winvm bash[75]: │\n    │ [    2.539699] winvm bash[75]: │ Rotate (both sides must match):\n    │ [    2.539699] winvm bash[75]: │   1. relay:   adom-bridge serve --supervise --token <secret>\n    │ [    2.539699] winvm bash[75]: │              (or export ADOM_AUTH_TOKEN=<secret>)\n    │ [    2.539699] winvm bash[75]: │   2. desktop: set the same value as auth_token on that server entry\n    │ [    2.541494] winvm bash[75]: │              (Connections panel, or server_add with authToken)\n    │ [    2.541494] winvm bash[75]: │ Check any relay:  curl -s <relay-http>/health   -> usingDefaultToken\n    │ [    2.541494] winvm bash[75]: └────────────────────────────────────────────────────────────────────────────\n    │ [    2.549966] winvm systemd[1]: Started [redacted] - Getty on tty4.\n    │ [    2.554263] winvm systemd[1]: e2scrub_reap.service: Deactivated successfully.\n    │ [    2.554678] winvm systemd[1]: Finished e2scrub_reap.service - Remove Stale Online ext4 Metadata Check Snapshots.\n    │ [    2.563954] winvm systemd[1]: Started [redacted] - Getty on tty5.\n    │ [    2.566532] winvm systemd[1]: Started [redacted] - Getty on tty6.\n    │ [    2.568394] winvm systemd[1]: Finished getty-static.service - getty on tty2-tty6 if dbus and logind are not available.\n    │ [    2.569390] winvm systemd[1]: Reached target getty.target - Login Prompts.\n    │ [    2.569755] winvm systemd[1]: Reached target multi-user.target - Multi-User System.\n    │ [    2.571095] winvm systemd[1]: Starting systemd-update-utmp-runlevel.service - Record Runlevel Change in UTMP...\n    │ [    2.585228] winvm systemd[1]: systemd-update-utmp-runlevel.service: Deactivated successfully.\n    │ [    2.585501] winvm systemd[1]: Finished systemd-update-utmp-runlevel.service - Record Runlevel Change in UTMP.\n    │ [    2.586194] winvm systemd[1]: Startup finished in 461ms.\n    │ [    2.754305] winvm kernel: TCP: eth0: Driver has suspect GRO implementation, TCP performance may be compromised.\n    │ [    2.758493] winvm CRON[86]: pam_unix(cron:session): session closed for user adom\n    │ [    2.760443] winvm login[150]: pam_unix(login:session): session opened for user adom(uid=1001) by adom(uid=0)\n    │ [    2.843603] winvm bash[76]: 10-16 03:48:30 NOTICE update available: wiki has 0.28.7, running 0.28.6. `adom-wiki pkg update adom/adom-shotlog` then restart `adom-shotlog serve`.\n    │ [    2.960461] winvm bash[75]: Adom relay server started\n    │ [    2.960461] winvm bash[75]:   WebSocket: ws://0.0.0.0:8765\n    │ [    2.960461] winvm bash[75]:   HTTP API:  http://127.0.0.1:8766\n    │ [    3.402931] winvm code-server[77]: [2026-10-16T03:48:31.519Z] info  code-server 4.124.2 9fe7eb79d5ab2f2ed369d0e79cce4dbc6fe00a31\n    │ [    3.404557] winvm code-server[77]: [2026-10-16T03:48:31.530Z] info  Using user-data-dir /home/adom/.local/share/code-server\n    │ [    3.421084] winvm code-server[77]: [2026-10-16T03:48:31.547Z] info  Using config file /home/adom/.config/code-server/config.yaml\n    │ [    3.421194] winvm code-server[77]: [2026-10-16T03:48:31.547Z] info  HTTP server listening on http://127.0.0.1:7380/\n    │ [    3.421194] winvm code-server[77]: [2026-10-16T03:48:31.547Z] info    - Authentication is disabled\n    │ [    3.421194] winvm code-server[77]: [2026-10-16T03:48:31.547Z] info    - Not serving HTTPS\n    │ [    3.421194] winvm code-server[77]: [2026-10-16T03:48:31.547Z] info  Using proxy URI in PORTS tab: http://{{port}}.localhost:47083/\n    │ [    3.421194] winvm code-server[77]: [2026-10-16T03:48:31.547Z] info  Session server listening on /home/adom/.local/share/code-server/code-server-ipc.sock\n    │ [    6.399939] winvm unknown: WSL (132) ERROR: CheckConnection: getaddrinfo() failed: -5\n    │ [    6.414530] winvm unknown: WSL (132) ERROR: CheckConnection: getaddrinfo() failed: -5\n    │ [    6.429838] winvm unknown: WSL (132) ERROR: CheckConnection: connect() failed: 101\n    │ [   12.841134] winvm unknown: WSL (2 - Interop) ERROR: CreateLoginSession:3068: Timed out waiting for user session for uid=1001\n    │ [   12.844585] winvm unknown: WSL (2 - Interop) ERROR: SendMessage:206: Failed to write message LxMessageResultBool. Channel: InteropServer\n    │ [   12.845752] winvm unknown: WSL (2) ERROR: Exception thrown from a scope_exit lambda Broken pipe @C:/__w/1/s/src/shared/inc\\SocketChannel.h:207 (SendMessage)\n    │ [   13.401728] winvm login[313]: pam_unix(login:session): session opened for user root(uid=0) by root(uid=0)\n    │ [   13.403501] winvm login[325]: ROOT LOGIN  on '/dev/pts/2'\n    │ [   20.160891] winvm code-server[77]: [03:48:48]\n    │ [   20.226305] winvm code-server[77]: [reconnection-grace-time] No CLI argument provided, using default: 10800000ms (10800s)\n    │ [   20.227455] winvm code-server[77]: [03:48:48] [AgentHostChannel] Registered unavailable IPC channel 'agentHostProxy': no --agent-host-bridge-port / --agent-host-bridge-path set.\n    │ [   20.231437] winvm code-server[77]: [03:48:48] Extension host agent started.\n    │ [   20.241986] winvm code-server[77]: (node:195) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.\n    │ [   20.241986] winvm code-server[77]: (Use `node --trace-deprecation ...` to show where the warning was created)\n    │ [   21.152517] winvm code-server[77]: File not found: /usr/lib/code-server/lib/vscode/node_modules/vsda/rust/web/vsda_bg.wasm\n    │ [   21.152750] winvm code-server[77]: File not found: /usr/lib/code-server/lib/vscode/node_modules/vsda/rust/web/vsda.js\n    │ [   21.161284] winvm code-server[77]: [03:48:49] [127.0.0.1][0e5aebbb][ManagementConnection] New connection established.\n    │ [   21.435603] winvm code-server[77]: (node:195) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.\n    │ [   21.769772] winvm code-server[77]: [03:48:49] [127.0.0.1][61d0966d][ExtensionHostConnection] New connection established.\n    │ [   21.831433] winvm code-server[77]: [03:48:49] [127.0.0.1][61d0966d][ExtensionHostConnection] <428> Launched Extension Host Process.\n    │ [   22.165097] winvm code-server[77]: [03:48:50] [127.0.0.1][61d0966d][ExtensionHostConnection] <428> [reconnection-grace-time] Extension host: read VSCODE_RECONNECTION_GRACE_TIME=10800000ms (10800s)\n    │ [   23.484771] winvm unknown: WSL (2 - Interop) ERROR: CreateLoginSession:3068: Timed out waiting for user session for uid=0\n    │ [   23.487061] winvm unknown: WSL (2 - Interop) ERROR: SendMessage:206: Failed to write message LxMessageResultBool. Channel: InteropServer\n    │ [   23.491515] winvm unknown: WSL (2) ERROR: Exception thrown from a scope_exit lambda Broken pipe @C:/__w/1/s/src/shared/inc\\SocketChannel.h:207 (SendMessage)\n    │ [   23.572825] winvm systemd[1]: Started hd-loopback-probe.service - /usr/bin/python3 -m http.server 47996 --bind 127.0.0.1.\n    │ [   24.591859] winvm python3[513]: 127.0.0.1 - - [16/Oct/2026 03:48:52] \"GET / HTTP/1.1\" 200 -\n    │ [   25.330754] winvm systemd[1]: Stopping hd-loopback-probe.service - /usr/bin/python3 -m http.server 47996 --bind 127.0.0.1...\n    │ [   25.332432] winvm systemd[1]: hd-loopback-probe.service: Deactivated successfully.\n    │ [   25.332648] winvm systemd[1]: Stopped hd-loopback-probe.service - /usr/bin/python3 -m http.server 47996 --bind 127.0.0.1.\n    │ [   29.041854] winvm systemd[1]: Reloading requested from client PID 763 ('systemctl')...\n    │ [   29.042118] winvm systemd[1]: Reloading...\n    │ [   29.149160] winvm systemd[1]: Reloading finished in 106 ms.\n    │ [   33.761918] winvm CRON[923]: pam_unix(cron:session): session opened for user adom(uid=1001) by adom(uid=0)\n    │ [   33.762525] winvm CRON[924]: (adom) CMD (python3 /home/adom/.local/share/adom/codex/runtime/manage.py ensure-watch >/dev/null 2>&1 # adom/codex runtime)\n    │ [   33.853815] winvm CRON[923]: pam_unix(cron:session): session closed for user adom\n    │ [   36.424537] winvm systemd[1]: Started hd-loopback-probe.service - /usr/bin/python3 -m http.server 47996 --bind 127.0.0.1.\n    │ [   37.451470] winvm python3[952]: 127.0.0.1 - - [16/Oct/2026 03:49:05] \"GET / HTTP/1.1\" 200 -\n    │ [   37.533704] winvm systemd[1]: Stopping hd-loopback-probe.service - /usr/bin/python3 -m http.server 47996 --bind 127.0.0.1...\n    │ [   37.535523] winvm systemd[1]: hd-loopback-probe.service: Deactivated successfully.\n    │ [   37.535757] winvm systemd[1]: Stopped hd-loopback-probe.service - /usr/bin/python3 -m http.server 47996 --bind 127.0.0.1.\n    │ [   49.091622] winvm kernel: hv_balloon: Max. dynamic memory size: 16380 MB\n    │ [   74.785390] winvm code-server[77]: [03:49:42] [127.0.0.1][0e5aebbb][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.\n    │ [   76.878220] winvm systemd[1]: Stopping code-server.service - Adom code-server (Hydrogen Desktop workspace editor)...\n    │ [   77.009889] winvm systemd[1]: code-server.service: Deactivated successfully.\n    │ [   77.010331] winvm systemd[1]: Stopped code-server.service - Adom code-server (Hydrogen Desktop workspace editor).\n    │ [   77.010610] winvm systemd[1]: code-server.service: Consumed 15.832s CPU time, 1.3G memory peak, 0B memory swap peak.\n    │ [   93.857351] winvm CRON[1627]: pam_unix(cron:session): session opened for user adom(uid=1001) by adom(uid=0)\n    │ [   93.857744] winvm CRON[1628]: (adom) CMD (python3 /home/adom/.local/share/adom/codex/runtime/manage.py ensure-watch >/dev/null 2>&1 # adom/codex runtime)\n    │ [   93.889155] winvm CRON[1627]: pam_unix(cron:session): session closed for user adom\n  ── end boot log ──\n  ✓ workspace booted: systemd is 'running' after 0s (a degraded per-user session is normal for v9)\n  image version check: rootfs(/etc/adom-golden-version)=v31-full · HD-wrote(/etc/adom-tarball-version)=v31-full · expected=v31-full\nEnsuring adom user (uid 1001/gid 1001) + /home/adom/project...\n  ✓ adom user already present\n  ✓ /home/adom/project ready\nWriting adom-host alias (WSL2 → Windows gateway)...\n  ✓ alias ready\nStarting code-server inside the distro...\n  ✓ code-server start issued\n  ✓ api-key persistence ensured (boot-proof)\nDeep-verifying workspace (target: code-server reachable on host 127.0.0.1:7380)...\n  ✓ distro 'Adom-Workspace' is registered\n  --- verification round 1/3 ---\n  ✓ code-server binary present in distro\n  ✓ code-server process running in distro\n  ✗ code-server LISTENING on :7380 inside distro\n    → REPAIR: (re)starting code-server on the correct bind-addr...\n    ✓ code-server (re)started\n  ✗ code-server: port-held-windows: Port 7380 is in use by Windows PowerShell (powershell.exe) on Windows, and Hydrogen's editor needs it. Close Windows PowerShell, then run setup again.\n  ✗ workspace setup attempt failed (will retry if attempts remain): code-server: port-held-windows: Port 7380 is in use by Windows PowerShell (powershell.exe) on Windows, and Hydrogen's editor needs it. Close Windows PowerShell, then run setup again.",
    "percent": 0.0,
    "attempts": 0,
    "max_attempts": 3
  }
}