Repository navigation
fix(ca,sandbox): idle-sleep copy, retire --base-image-digest - #1369
Merged
Merged
Conversation
Since backboard #41923 (2026-10-07), new cloud agents power off after 5 minutes with no SSH session, outbound traffic or agent turn, and wake on SSH, HTTP or API. Since #39843 the SSH relay wakes a sleeping agent on any SSH connection. Help, the create and disconnect messages, and the cloud-agents guide still said agents have no idle timeout and that a desktop app can't wake one. - Help for `ca`, `ca start`, `ca ssh`, `ca desktop` and `code`, the create message, and the disconnect/session-ended notes now describe idle sleep. - The desktop setup note says connecting over SSH wakes the agent, and to run `railway ca wake` and retry if the app times out. - The hidden `--keep-awake` help says it is ignored and doesn't prevent idle sleep. - The guide notes agents created before 2026-10-07 don't sleep on their own. - The access.rs comment now says the CLOUD_AGENTS flag is enforced by the CLI and dashboard, not the API. Wording only; no lifecycle behavior changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…epts Backboard #36421 removed baseImageDigest from SandboxTemplateInput, so `railway sandbox template build --base-image-digest` fails, and so does `railway sandbox create --template` for a stored template that recorded a digest. The server pins the default base image itself. - Drop the flag and the field from the CLI's copy of SandboxTemplateInput in schema.json (a one-field edit; the rest of the file is byte-identical). - Drop baseImageDigest from StoredSandboxTemplate. Existing records that carry it still parse (serde ignores the unknown field) and lose it on the next config write; a test covers this. - Drop baseImageDigest from `sandbox template list --json`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unch `--keep-awake` is a hidden no-op kept for old scripts, but `is_bare()` still read it, so `railway ca --keep-awake` skipped the TUI and opened the launcher. A flag that does nothing should not change what runs, so `is_bare()` now ignores it. That is less surprising than documenting the side effect: the flag stays fully inert, `railway ca --keep-awake` behaves exactly like `railway ca`, and `railway code --keep-awake` (which never reads `is_bare()`) is unchanged. - Its hidden help now says it is ignored and has no effect on sleep. - The controllers/cloud_agent.rs module comment no longer says `--keep-awake` declines to sleep. - A test pins that `--keep-awake` alone is still a bare invocation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to the idle-sleep copy. "Powers off" becomes "sleeps", which matches task.rs, agent.rs and railwayapp/docs#1454, and the text says plainly that sleeping ends processes. - Disconnect and session-ended notes (`ca ssh`, `code`, the TUI) no longer say "still running and powers off after 5 idle minutes", which invited leaving a job running. They now say the agent sleeps after 5 minutes with no SSH client, network traffic or agent turn, which ends its processes. - Agents created before the idle-sleep deploy (monorepo #41923, 2026-10-08 00:37 UTC) keep a spec without idle sleep, so for those the notes keep the previous text: still running until `railway ca sleep`. `ca::sleeps_when_idle` compares `created_at` to that cutoff; it is a heuristic and says so. The TUI agent now carries `created_at` for this. - `ca desktop`: help and the guide scope the rerun advice to OpenCode (agents created since Oct 8 restart its server on wake; rerun `railway ca desktop --opencode` if it can't connect). OpenCode's completion line mentions idle sleep. The wake note drops the yellow `!`, and the final line no longer says "stops the compute bill" for agents that sleep on their own. - docs/cloud-agents.md: what counts as idle (no SSH client attached, almost no network traffic, no coding agent working or waiting), and the cutoff date corrected from Oct 7 to Oct 8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…egacy templates Follow-up to removing `--base-image-digest`. - The flag is back, hidden, and stops with "Base images are no longer configurable; templates build on the default sandbox image." This matches how retired flags are handled elsewhere (`--keep-awake`, #1351, #854) instead of failing with clap's "unexpected argument". - `StoredSandboxTemplate.base_image_digest` is back as a legacy optional field: read and written so old records round-trip, never sent to the API. `sandbox template list --json` reports it again. - A stored template that has one used to fail at the API with "Sandbox checkpoint not found" (without the digest, its recipe names a checkpoint that was never built). `sandbox create --template` now stops first and says to rebuild it with `railway sandbox template build`. - The serde test now parses a whole `RailwayConfig` containing the legacy field, since a config parse failure regenerates the file and drops the user's token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codyde
marked this pull request as ready for review
November 17, 2026 17:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates Cloud Agent help and messages for idle sleep, and retires
--base-image-digest, which the API stopped accepting in August.Changes
ca,ca start,ca ssh,ca desktop,code, theca createmessage and docs/cloud-agents.md say an idle agent sleeps after 5 minutes, that sleeping ends its processes, and that connecting wakes it.ca ssh,code, TUI) say the agent sleeps after 5 minutes with no SSH client, network traffic or agent turn, which ends its processes. For agents created before 2026-10-08 00:37 UTC they keep the old "still running untilrailway ca sleep" note (ca::sleeps_when_idle, acreated_atheuristic, unit tested).ca desktop: rerun advice is scoped to OpenCode (agents created since Oct 8 restart its server on wake; rerunrailway ca desktop --opencodeif it can't connect). Claude and Codex just reconnect. The wake note no longer uses a warning icon.--keep-awakestays a hidden no-op, and barerailway ca --keep-awakenow opens the TUI likerailway cainstead of the launcher.sandbox template build --base-image-digestis hidden and stops with "Base images are no longer configurable; templates build on the default sandbox image."sandbox create --templaterefuses a stored template built on a custom base image and says to rebuild it. Before, it failed at the API with "Sandbox checkpoint not found". The legacy field stays in the local config and is never sent.baseImageDigestis removed from the CLI's copy ofSandboxTemplateInputin schema.json (one-field edit; the rest of the file is unchanged).CLOUD_AGENTSflag is enforced by the CLI and dashboard, not on create by the API.Verification
controllers/cloudAgent/idleSleep.ts(no active SSH, no outbound network, no busy workload) and vm-initcontroller/idle_sleep.go(under 8 KiB sent per poll; busy marker covers a running or waiting agent turn).CLOUD_AGENT_IDLE_SLEEP_SECONDSincontrollers/cloudAgent/create.ts, from #41923.baseImageDigestremoval: backboard #36421 (Aug 25); "Sandbox checkpoint not found" comes fromcontrollers/sandboxes/create.ts.RailwayConfigthat contains the legacybaseImageDigest, so a parse failure (which regenerates the config and drops the token) would be caught.The
railway ca sleepwake bug and the OpenCode/Codex setup "port occupied" bug are fixed in #1370.🤖 Generated with Claude Code