Archiving a conversation in the sidebar is a different operation. It does not mean the worktree is being removed.
Configure a script
Open the project on the device that owns its files. Install the tools your command needs on that device, and use commands appropriate for its shell. The walkthrough below uses the desktop app.- Open Settings → Project and check the displayed project path.
- Choose Shared or Local under Save changes to.
- Enter a command in Scripts → Setup, Run, or Archive. Commands can span multiple lines.
- Choose Save to .kisuke/project.json for Shared, or Save to .kisuke/project.local.json for Local.
- Wait for the saved confirmation, then return to the conversation.
Shared and local configuration
Shared writes.kisuke/project.json in the selected project folder. You can review and commit this file so other checkouts and collaborators receive it. Saving does not create a Git commit.
Local writes .kisuke/project.local.json. Its values override the corresponding shared fields; other shared fields still apply. Kisuke also adds an ignore rule for the local file when needed. Review any resulting .gitignore change in Git.
The form shows the combined configuration. Check its values before saving them as Shared. A local override can continue to mask a shared script you just changed.
To remove an inherited command, inspect both configuration files. Clearing a Local field can expose the Shared command again; it does not disable that inherited command.
Start Run and inspect its output
- Return to an open conversation in the intended checkout.
- Open Workspace scripts and choose Run script.
- Follow the output in the right panel. Check the command’s own messages for readiness or errors.
- For a server, select an HTTP or HTTPS link in its output to open it in the Browser.
- Return through Workspace scripts → Run script to inspect the active run’s output.
- Choose Stop in the Run pane when you want to end the script.
Detail of Run's status and the printed preview address.
View the full Zen workspace
View the full Zen workspace

Read the status
Hiding the pane or opening Browser does not stop the process. Use Stop explicitly. If a command starts detached services, check those services separately using their own controls.
Output is a bounded view of events received by the current app session, not a permanent log. After a disconnect or restart, inspect the actual process and its listening port before starting another run.
Example: preview a static site
For a project containingindex.html, with Python 3 installed on its device, put this in Run on macOS or Linux:
KISUKE_PORT supplies an assigned port number. It does not make your server start or guarantee that another application is not using the port. If the server reports an address conflict, choose a suitable available port in your command and open the address the server actually uses.
Values available to commands
KISUKE_WORKSPACE_NAME: the working folder’s name.KISUKE_WORKSPACE_PATH: the folder where the script runs.KISUKE_ROOT_PATH: the project folder whose configuration started the script. Automatic worktree hooks use the main repository folder; Zen Run uses the selected checkout.KISUKE_DEFAULT_BRANCH: the configured Branch new workspaces from value, ororigin/mainwhen unset. This does not prove that branch exists.KISUKE_PORT: the port assigned to that working-folder path. Repeated allocations for the same path reuse it. The value is empty if no port can be assigned.
localhost address on that device can differ from one on the computer displaying Kisuke.
Setup and separate checkouts
Configure Setup in the repository’s main checkout before creating a worktree. Kisuke reads that configuration and runs the command in the new checkout. Saving Setup for a folder that is already open does not run it retroactively. For ordinary worktree creation, Setup runs in the background. The destination opening does not mean installation has finished. Check its result before starting a server or asking the agent to use the installed tools. A failed Setup can leave the checkout present but incomplete. Workspace scripts → View setup script opens the Setup viewer when Setup is configured in the selected folder. It displays available session output; it is not a rerun button. If no output is available, inspect the checkout’s actual files or dependencies. Use Terminal if you need to run the preparation command manually in an existing checkout. Continue from a response follows different preparation rules: its new-worktree operation waits for Setup and reports a failure before opening the destination conversation.Make Run available in a worktree
Zen reads Run configuration from the currently selected folder. A local script stored only in the main checkout does not automatically appear in every linked checkout. Commit the shared.kisuke/project.json on the branch you create the worktree from, or deliberately include the configuration you need in the main checkout’s Files to copy rules. Those rules apply during creation; they do not synchronize later edits. Review copied local configuration before using it in another folder.
If the menu says Add run script, inspect .kisuke/project.json and .kisuke/project.local.json inside that checkout. If Project settings asks you to open a project, return to the main checkout to configure future worktrees, or edit the intended checkout’s configuration through Files.
Archive and cleanup
Archive runs in the worktree before Git removal is attempted, and Kisuke waits for the command to exit. Keep it focused on cleanup for that checkout. Cleanup can run even if Git subsequently rejects removal. Inspect the checkout and any services before repeating the removal request. Follow the worktree removal guidance for file and branch consequences.Troubleshoot a script
When reporting a failure, include the script kind, selected folder and device, exit code, and relevant output. Remove credentials from any command or log you share.