config.yml:
protected_branches— branches where saving a file auto-creates a new feature branch instead of writing directly to the current branch.base_branch— the branch that newly auto-created feature branches fork from. Lets you serve from a “deployment” branch while forking new work from a separate “integration” branch.
local_git indicator in the IDE) and the server is running in multi-workspace
mode. In single-workspace mode (oxy serve --local) the protected-branch
guard is disabled entirely — a single developer on their own machine writes
directly to whichever branch they have checked out.
protected_branches
Branches where saving a file in the IDE auto-creates a new feature branch
instead of overwriting the current branch. Defaults to the repository’s
default branch (usually
main or master), resolved from
git symbolic-ref refs/remotes/origin/HEAD.<user-slug>/<timestamp> (e.g. alice/2026-04-15-113742), writes the file
there, and switches the IDE to that branch.
config.yml
base_branch
Branch used as the fork point when Oxy auto-creates a new feature branch.
When unset (the default), new branches fork from the main worktree’s current
HEAD — whatever the server has checked out.<user-slug>/<timestamp> forks from
whatever branch the server currently has checked out. That is fine when Oxy
serves from main and you want new work to branch off main.
It is not fine when Oxy serves from a dedicated deployment branch — in that
case you usually want new work to fork from your integration branch (e.g.
main), not from the deployment checkout. base_branch is the switch:
config.yml
base_branch only affects newly created branches. Attaching a worktree
to a branch that already exists always uses that branch’s existing ref as the
starting point, regardless of this setting.
When to use it
Usebase_branch when your workflow has a meaningful split between:
- A deployment / serving branch — the one Oxy actually runs against
(configured via
GIT_BRANCHat startup, or whatever you manually check out in the workspace directory). - An integration branch — the one humans merge their PRs into and where new work should start.
base_branch unset and new worktrees
will fork from the current checkout.
Interaction with Single-Workspace Mode
When Oxy runs withoxy serve --local (single-workspace mode), the
protected-branch guard is always disabled, regardless of how
protected_branches is configured. The assumption is that a single developer
running Oxy locally against their own checkout expects direct writes to the
branch they have open, not an auto-PR workflow.
base_branch still has no effect in this mode because no new branches are
auto-created — the user writes directly to whichever branch they have out.
If you want the full branching workflow locally, run Oxy in multi-workspace
mode (omit --local) and point it at your workspace.
Full Example
config.yml
See Also
oxy servereference —--localflag and git initialization behaviour.- Readonly Mode — a related guard that blocks all file writes at the API layer, not just writes to protected branches.
- Cloud Mode — deployment scenarios where the deployment-vs-integration branch split is most common.