{"name":"--on-branch","slug":"on-branch","family":"cli","title":"CLI flags","noun":"CLI flag","description":"Start a cloud session on your own environment with claude --environment, plus hidden --ref and --on-branch companions.","description_source":"entry","described_by":{"version":"2.1.224","anchor":"start-a-cloud-session-on-a-self-hosted-environment-with-envi"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.309","builds":0,"mined_builds":150,"first_cited":{"version":"2.1.304","released_at":"2026-10-19 19:47:15","spans":2}},"aliases":[],"entries":[{"version":"2.1.304","anchor":"on-branch-ref-revision-pool-options-threaded-through-a","heading":"Task launches can take their starting branch from --on-branch or --ref","line":"A launch path now uses the branch from --on-branch first, then the ref from --ref, and records which flag supplied it","released_at":"2026-10-19 19:47:15","reason":"found in this entry's text"},{"version":"2.1.301","anchor":"cloud-launch-passes-explicit-ref-and-device-too-old-state","heading":"Cloud session launch records which ref you chose and how","line":"Creating a cloud session now notes the ref you named and whether it came from --on-branch or --ref, plus a new file sync state","released_at":"2026-10-15 14:34:23","reason":"found in this entry's text"},{"version":"2.1.290","anchor":"cloud-session-creation-clearer-errors-for-bad-session-ids-a","heading":"Clearer errors when creating a cloud session goes wrong","line":"If the server returns a session id Claude Code cannot use, it now warns a session may exist and points you to claude.ai\/code","released_at":"2026-10-05 18:12:44","reason":"found in this entry's text"},{"version":"2.1.277","anchor":"new-git-branch-guard-telemetryenv-override-for-cloud-sessio","heading":"New git-branch-guard telemetry\/env override for cloud session on-branch checkout","line":"Cloud on-branch checkout guard can now be forced on via a CCR_ON_BRANCH_DEFAULT_GUARD environment variable","released_at":"2026-09-18 16:22:26","reason":"found in this entry's text"},{"version":"2.1.248","anchor":"cloud-and-pool-flags-no-longer-confuse-prompt-detection","heading":"Cloud and pool flags no longer confuse prompt detection","line":"Cloud flags like --pool and --ref no longer swallow their values as your prompt.","released_at":"2026-08-27 20:35:36","reason":"named in this entry, found in this entry's text"},{"version":"2.1.232","anchor":"project-no-longer-starts-a-cloud-session","heading":"--project no longer starts a cloud session","line":"Passing --project alone won't start a cloud session; --ref and --on-branch now need --cloud or --environment.","released_at":"2026-08-13 21:30:53","reason":"named in this entry, found in this entry's text"},{"version":"2.1.224","anchor":"start-a-cloud-session-on-a-self-hosted-environment-with-envi","heading":"Start a cloud session on a self-hosted environment with --environment","line":"Start a cloud session on your own environment with claude --environment, plus hidden --ref and --on-branch companions.","released_at":"2026-08-07 01:36:32","reason":"named in this entry, found in this entry's text"}],"entries_total":7,"docs":[],"docs_total":0,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/cli\/on-branch","family_url":"https:\/\/changelogs.core-directive.com\/reference\/cli.json"}