{"version":"2.1.337","anchor":"new-tree-ready-file-flag-marked-unsupported-for-remoteclo","canonical_anchor":"new-tree-ready-file-flag-marked-unsupported-for-remoteclo","heading":"Hidden --tree-ready-file option lets a host make a session wait for its folder","tier":"use","area":"CLI","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/new-tree-ready-file-flag-marked-unsupported-for-remoteclo","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### Hidden --tree-ready-file option lets a host make a session wait for its folder\n\nA new hidden SDK-only --tree-ready-file option makes tools and hooks wait until a host marks the working folder ready\n\n**Unclear.** It is not clear whether `--tree-ready-file` can be typed by users or is only meant for host apps.\n\n**What**\n\nThere is a new startup option, `--tree-ready-file <file>`. It is hidden from the help text, marked as only for the Agent SDK (the toolkit developers use to run Claude Code from their own programs), and ordinary command-line users cannot reach it. It is new in this build.\n\nA host program passes it when it is still writing the working folder, such as a new git worktree (a separate checkout of a repository). Until the named file says \"ready\", tools and hooks wait. Hooks are scripts that run automatically at set points.\n\nThe rules it enforces at startup:\n\n- Only for a new session started with `--print`, `--input-format=stream-json` and `--output-format=stream-json`.\n\n- Not allowed with `--await-claim`, `--worktree`, `--sdk-url`, `--continue`, `--resume` or `--fork-session`.\n\n- Needs a `--project-config-root` outside the working folder.\n\n- The file path must be absolute, local, and outside both the working folder and the `--project-config-root`.\n\n- Breaking a rule exits with an error.\n\nIt is also listed as unsupported for remote or cloud launches, described as holding \"a local session for a folder that its host is still writing\".\n\n**Why**\n\nA host can start Claude Code before a worktree is fully filled in without tools or hooks acting on a half-written folder. Most users never see this option.\n\n- Area: CLI\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}