Answer: You configure a setup hook for worktrees by adding a `post_setup_worktree` hook in `.windsurf/hooks.json`, with a command such as `bash $ROOT_WORKSPACE_PATH/hooks/setup_worktree.sh`. The hook runs after each worktree is created and configured, inside the new worktree directory. Status: Confirmed Entry: tool/devin/settings/worktree-setup-hook Revision: 1 Digest: sha256:e7277847da2d492c (changes whenever the content changes) Timeline: Created: 2026-11-13T03:13:21Z Last changed: 2026-11-13T03:13:21Z Last verified: 2026-11-20T12:43:11Z Next check: 2026-11-21T12:43:11Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Config file | .windsurf/hooks.json | [1] | 2026-11-20 Hook name | post_setup_worktree | [1] | 2026-11-20 Example command | bash $ROOT_WORKSPACE_PATH/hooks/setup_worktree.sh | [1] | 2026-11-20 When it runs | after each worktree is created and configured | [1] | 2026-11-20 Execution location | inside the new **worktree** directory | [1] | 2026-11-20 Environment variable | $ROOT_WORKSPACE_PATH | [1] | 2026-11-20 Sources: [1] Cognition. "Cascade (legacy)". https://docs.devin.ai/desktop/cascade.md Role: primary. Accessed: 2026-11-20T12:43:11Z Quote: "**Config** (in `.windsurf/hooks.json`):" (Supports: Config file) Quote: "you can use the `post_setup_worktree` hook to copy them into the worktree directory." (Supports: Hook name) Quote: ""command": "bash $ROOT_WORKSPACE_PATH/hooks/setup_worktree.sh"," (Supports: Example command) Quote: "The `post_setup_worktree` hook runs after each worktree is created and configured." (Supports: When it runs) Quote: "It is executed inside the new **worktree** directory." (Supports: Execution location) Quote: "The `$ROOT_WORKSPACE_PATH` environment variable points to the original workspace path" (Supports: Environment variable) Published: 2026-11-20T11:29:25Z Snapshot SHA-256: 2384bd5acf11f3b90c627e0bd544d209dc44bdd4cd39184c060919ad99b55fae (captured 2026-11-13T03:13:21Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:13:21Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:43:11Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:43:11Z Last attempt: 2026-11-20T12:43:11Z Notes and limitations: Extracted automatically from a single official source (section "Setup hook"). Related: https://latestn.com/tool/devin/troubleshooting/allowlist-domains-network What domains should I allowlist for Devin Desktop network filters, firewalls, VPNs, or proxies? https://latestn.com/tool/devin/troubleshooting/capture-tls-error-devtools How do I capture the underlying TLS/SSL error in Devin Desktop using Developer Tools? https://latestn.com/tool/devin/troubleshooting/cascade-panel-blank Why is my Devin Cascade panel blank and how do I fix it? https://latestn.com/tool/devin/settings/workflow-storage-locations Where does Devin Desktop Cascade look for Workflow files? https://latestn.com/tool/devin/settings/workflow-storage-locations-2 Where does Devin Cascade look for Workflow files? https://latestn.com/tool/devin/settings/worktree-location Where does Devin Desktop store its worktrees and how do I list active worktrees? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:13:21Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/devin/settings/worktree-setup-hook/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/devin/settings/worktree-setup-hook POST: https://latestn.com/dispute/tool/devin/settings/worktree-setup-hook with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/devin/settings/worktree-setup-hook?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure a setup hook for worktrees in Devin Desktop Cascade? Revision 1, last verified 2026-11-20T12:43:11Z. https://latestn.com/tool/devin/settings/worktree-setup-hook (accessed 2026-11-21T09:52:23Z). @misc{LatestN_tool_devin_settings_worktree_setup_hook_r1, title = {How do I configure a setup hook for worktrees in Devin Desktop Cascade?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/devin/settings/worktree-setup-hook}}, note = {Revision 1; digest sha256:e7277847da2d492c; last verified 2026-11-20T12:43:11Z; accessed 2026-11-21T09:52:23Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/devin/settings/worktree-setup-hook