Skip to main content
Use project setup to give every new worktree the same browser workspace.

Adapt this recipe to your project
Copy a ready-to-use prompt for your coding agent.

What you’ll build

You’ll make it so that when you click the create worktree button in Radius, that the setup script automatically opens two tab slots with two split tabs, opening your chat, diff viewer, localhost, and terminal.

Before you start

  • On a new tab, select Work in a project below the chat input, then choose your project.
  • Choose the local URL your development server uses. This recipe defaults to http://localhost:3000.

Configure the recipe

Add this directly to .radius/settings.toml, changing DEV_URL if your development server uses a different address:
If the project already has a setup command, keep it in the same multiline value and place these Radius commands after the existing commands.

Try it

Create a new worktree in Radius. Radius runs the setup command from that worktree, builds the two split tab slots, and leaves the chat ready for your next message.

How it works

  • RADIUS_TAB_ID is the chat Radius opened for the new worktree. The setup command uses it as the first split anchor instead of opening another chat.
  • Opening the diff viewer to the right of chat creates the first tab slot.
  • The setup command opens localhost and the terminal as ordinary background tabs, then combines them into a second tab slot with tab split.
  • --project-path explicitly tells chats, the diff viewer, and the terminal which worktree to open. The tab IDs determine layout only.
  • Background opens avoid presenting temporary ordinary tabs before the second split is assembled. The final command explicitly restores focus to chat.

Adapt it

Set a different DEV_URL in the same project settings block when the development server uses another address. You can also replace the localhost URL with any project-specific page without changing the split commands. To open another chat that is attached to the same worktree, use:
If the development server is not running yet, Radius still opens the localhost pane. Start the server from the terminal and reload the page when it is ready. Because the setup command uses set -e, a failed Radius command stops setup instead of leaving a partially configured workspace without reporting the failure.