[{"data":1,"prerenderedAt":197},["ShallowReactive",2],{"site-nav-marketing":3,"feature-worktrees-and-hooks":36,"features-all-nav":180},{"features":4,"compare":23},[5,8,11,14,17,20],{"label":6,"to":7},"Sessions & status","\u002Ffeatures\u002Fsessions-and-status",{"label":9,"to":10},"Review","\u002Ffeatures\u002Freview",{"label":12,"to":13},"Worktrees & hooks","\u002Ffeatures\u002Fworktrees-and-hooks",{"label":15,"to":16},"Git & issues","\u002Ffeatures\u002Fgit-and-issues",{"label":18,"to":19},"Stacks","\u002Ffeatures\u002Fstacks",{"label":21,"to":22},"Teams","\u002Ffeatures\u002Fteams",[24,27,30,33],{"label":25,"to":26},"vs Claude Code","\u002Fcompare\u002Fclaude-code",{"label":28,"to":29},"vs Claude Squad and Nimbalyst","\u002Fcompare\u002Fclaude-squad-and-nimbalyst",{"label":31,"to":32},"vs Conductor","\u002Fcompare\u002Fconductor",{"label":34,"to":35},"vs Cursor","\u002Fcompare\u002Fcursor",{"id":37,"title":38,"body":39,"description":78,"draft":79,"extension":80,"faq":81,"hero":94,"meta":97,"navTitle":12,"navigation":98,"order":99,"path":13,"sections":100,"seo":176,"slug":177,"stem":178,"__hash__":179},"features\u002Ffeatures\u002Fworktrees-and-hooks.md","A git worktree per agent, set up by your own hooks",{"type":40,"value":41,"toc":73},"minimark",[42,47],[43,44,46],"h2",{"id":45},"read-more","Read more",[48,49,50,59,66],"ul",{},[51,52,53,58],"li",{},[54,55,57],"a",{"href":56},"\u002Fdocs\u002Fworktrees","Worktrees & env files",": where worktrees live, copying files and dev-server ports",[51,60,61,65],{},[54,62,64],{"href":63},"\u002Fdocs\u002Fhooks","Lifecycle hooks",": events, levels, combine modes and the hook environment",[51,67,68,72],{},[54,69,71],{"href":70},"\u002Fdocs\u002Fsessions","Sessions & worktrees",": new and existing branches, root-tree sessions",{"title":74,"searchDepth":75,"depth":75,"links":76},"",2,[77],{"id":45,"depth":75,"text":46},"Every Claude Code session gets its own git worktree, your .env files, a block of dev-server ports, and your Create, Run and Teardown hooks at three levels.",false,"md",[82,85,88,91],{"question":83,"answer":84},"Can I start a session without a worktree?","Yes. Start session on root tree runs the session directly in the project's main checkout. It is meant for quick edits. Sessions on the root tree share one working directory, so use a normal session when you want isolation.",{"question":86,"answer":87},"My dev server ignores PORT. What do I do?","Next.js, Nuxt, Rails and Express read PORT themselves. Vite, Astro and Angular do not, so pass the port on the command, for example pnpm dev --port $PLEXUS_PORT in a Run hook. On Windows, hooks run through cmd.exe, so write %PLEXUS_PORT% there.",{"question":89,"answer":90},"What happens if a Create hook fails?","With Stop if a setup step fails switched on (the default), a Create hook that exits with an error stops the launch, so you never get a half-prepared worktree. Run and Teardown hooks never stop the lifecycle. A hook that times out is reported but does not stop the launch.",{"question":92,"answer":93},"Do repository hooks run automatically?","Yes, while Run scripts committed to the repository is on, which is the default. Keep it on only for repositories you trust, or switch it off per project.",{"eyebrow":12,"headline":95,"lead":96},"Every session gets its own checkout, ready to run.","Plexus creates a git worktree for each session, copies in the env files git leaves out, gives the session its own ports and runs your setup scripts. You write each script once, at the level where it belongs.",{},true,3,[101,112,125,133,151,165],{"id":102,"heading":103,"body":104,"state":105,"docsPath":56,"sim":106},"worktree","One worktree per session","Starting a session creates a git worktree for it, by default at \u003Cproject>\u002Fworktrees\u002F\u003Csession-name>, on a new plexus\u002F\u003Cname> branch off the base you picked or on an existing branch. Plexus adds the folder to .gitignore so worktrees never show up as untracked changes. Removing a session removes the folder and git's own record of it. Plexus never deletes a branch it did not create without asking you first.","working",{"view":107,"project":108,"anchors":109},"projectGit","storefront",[110,111],"git-worktrees","git-ref:plexus\u002Fcheckout-flow",{"id":113,"heading":114,"body":115,"state":116,"docsPath":117,"sim":118},"env-files","The files git leaves out","A new worktree contains only tracked files, so .env and .env.local are missing and a dev server that needs them would fail. Plexus copies a list of files and folders into every new worktree, .env and .env.local by default, whether git tracks them or not. Paths must stay inside the repository: absolute paths and .. are refused, and symlinks are skipped.","neutral","\u002Fdocs\u002Fworktrees#copying-paths-into-worktrees",{"view":119,"tab":120,"anchors":121,"note":124},"sessions","hooks",[122,123],"hook-output","hook-runs","The Hook output tab lists the copy-paths run first.",{"id":126,"heading":127,"body":128,"state":116,"docsPath":129,"sim":130},"ports","Ten ports for each session","Two sessions of one repository both want port 3000. Plexus reserves a block of 10 free localhost ports for each session, from 20000–31999 by default, and exposes them as PLEXUS_PORT, PLEXUS_PORT_1 to PLEXUS_PORT_9 and PORT. The agent, the session's terminal and every hook get them. A session keeps its block when it resumes. Open localhost in the session's tab strip opens your browser on that port.","\u002Fdocs\u002Fworktrees#dev-server-ports",{"view":119,"anchors":131,"note":132},[122],"The app-sim has no anchor for the Open localhost button, which sits beside Hook output in the tab strip. See the report.",{"id":134,"heading":135,"body":136,"state":105,"docsPath":137,"sim":138},"events","Create, Run, Teardown","A hook is a shell script attached to one of three events. Create runs when the worktree is made: install dependencies, write local config. Run fires every time the agent starts or resumes: start a dev server or a watcher. Teardown runs when a session is removed: stop containers, clean up. The Hook output tab keeps each hook's output and exit status, and a hook that runs too long is stopped after the timeout, 600 seconds by default.","\u002Fdocs\u002Fhooks#the-three-events",{"view":120,"hooksScope":139,"hooksEvent":140,"anchors":141,"crop":146},"project","create",[142,143,144,145],"hooks-events","hook:create","hook:run","hook:teardown",{"x":147,"y":148,"w":149,"h":150},208,48,1232,852,{"id":152,"heading":153,"body":154,"state":116,"docsPath":155,"sim":156},"levels","Three levels, one resolved plan","Hooks are defined globally, per workspace or per project, and resolved from global down to project. Each workspace or project picks how its hooks join the ones it inherits: Override, Before, After or Parallel. The Resolved plan preview shows exactly what will run and in which order, with a badge saying where each hook came from, so you can check inheritance before you start a session.","\u002Fdocs\u002Fhooks#resolution-and-execution-order",{"view":120,"hooksScope":139,"anchors":157,"crop":164},[158,159,160,161,162,163],"hooks-combine","hooks-levels","plan:global","plan:workspace","plan:project","plan:builtin",{"x":147,"y":148,"w":149,"h":150},{"id":166,"heading":167,"body":168,"state":169,"docsPath":170,"sim":171},"repo-hooks","Hooks that ship with the repository","Commit hooks to .plexus\u002Fhooks.json and everyone who adds the repository gets them. They run alongside the hooks you set up in Plexus, and a setting decides which run first. Repository hooks run on your machine with your permissions, so Run scripts committed to the repository lets you switch them off for repositories you do not trust. Plexus removes Anthropic credentials from every hook's environment.","needs-you","\u002Fdocs\u002Fhooks#repo-committed-hooks",{"view":120,"hooksScope":139,"anchors":172,"crop":175},[173,174],"hooks-defined","hook-row",{"x":147,"y":148,"w":149,"h":150},{"title":38,"description":78},"worktrees-and-hooks","features\u002Fworktrees-and-hooks","2IBJrg6ryIhfjkBXMH9LyVRpF2PAvZM0XmALzdenoJg",[181,184,187,188,191,194],{"path":7,"title":182,"navTitle":6,"description":183},"Parallel Claude Code sessions with live status","Run many Claude Code agents at once, each in its own git worktree, and see which one needs you: working, needs you, delegating or idle, across every repo.",{"path":10,"title":185,"navTitle":9,"description":186},"Review AI agent changes like a pull request","A PR-style diff of each Claude Code session's worktree, inline comments the agent acts on, AI review, a review-and-fix cycle and the PR conversation.",{"path":13,"title":38,"navTitle":12,"description":78},{"path":16,"title":189,"navTitle":15,"description":190},"Git client, PRs and GitHub issues for AI agents","A git client per Claude Code session and per repo, GitHub and Bitbucket pull requests with CI status, and GitHub Issues and Projects boards in one window.",{"path":19,"title":192,"navTitle":18,"description":193},"Stacked pull requests and ordered merging for Claude Code sessions","Stack Claude Code sessions on each other's branches. Plexus keeps every branch synced as the agents work, shows the stack as a map, and merges it in order, as a GitHub stack or through a merge queue.",{"path":22,"title":195,"navTitle":21,"description":196},"Teams: organizations, managed settings, prompts","Organizations, shared workspaces, managed settings, a shared prompt library and sync for teams on Claude Code. Seats are paid; the core app stays free.",1792695507474]