Proof Portal

Project overview

Omarchy

ProbeLabs65 findings · 95 requirements

A proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.

Inbox
ReportR-1272GitHub issuePublicDecided· Out of scope

ga silently cd's into the existing worktree after `git worktree add` fails

Reported by nocstah · filed Aug 29, 2026 · open at source

Decided: Out of scope — decided by agents · verified 4 days ago.

At a glance

1 · What is claimed?
Only the report text below — no validator has restated it as checkable claims yet.
2 · What does it affect?
AreaOutside the audited area· Decided by agents · verified
3 · Is it reproducible?
No validation has been run yet.
4 · What remains unclear?
  • Not validated yet: no claims, no reproducer.
5 · What happens next?
Decided by agents and verified by a second, independent agent — see the decision.

Original report

ga silently cd's into the existing worktree after `git worktree add` failsrevision 1 · captured 2026-09-28 21:24 UTC via poll

What happened

Running ga <branch> for a branch that already exists prints a fatal error — and then moves you into the existing worktree anyway, as though it had succeeded. mise trust also runs on the path that was not created.

Cause

In default/bash/fns/worktrees, ga() does not check the result of the add:

git worktree add -b "$branch" "$wt_path"
mise trust "$wt_path"
cd "$wt_path"

When the branch already exists, git worktree add fails but $wt_path is still the path of the worktree created by the earlier successful ga, so the cd succeeds. The error message and the shell's behaviour disagree.

What was expected

A failed git worktree add aborts, leaving the shell where it was.

Steps to reproduce

cd some-repo
ga feature-x            # succeeds, moves you to ../some-repo--feature-x
cd ../some-repo
ga feature-x
# fatal: a branch named 'feature-x' already exists
pwd
# .../some-repo--feature-x   <- moved anyway, despite the fatal error

Verified with mise stubbed: mise trust ../some-repo--feature-x is still called on the failing run.

Fix

git worktree add -b "$branch" "$wt_path" || return 1
mise trust "$wt_path"
cd "$wt_path"

System

  • Omarchy 4.0.1-1
  • /usr/share/omarchy/default/bash/fns/worktrees, lines 11-13
View raw text
## What happened

Running `ga <branch>` for a branch that already exists prints a fatal error — and then moves you into the existing worktree anyway, as though it had succeeded. `mise trust` also runs on the path that was not created.

## Cause

In `default/bash/fns/worktrees`, `ga()` does not check the result of the add:

```bash
git worktree add -b "$branch" "$wt_path"
mise trust "$wt_path"
cd "$wt_path"
```

When the branch already exists, `git worktree add` fails but `$wt_path` is still the path of the worktree created by the *earlier* successful `ga`, so the `cd` succeeds. The error message and the shell's behaviour disagree.

## What was expected

A failed `git worktree add` aborts, leaving the shell where it was.

## Steps to reproduce

```bash
cd some-repo
ga feature-x            # succeeds, moves you to ../some-repo--feature-x
cd ../some-repo
ga feature-x
# fatal: a branch named 'feature-x' already exists
pwd
# .../some-repo--feature-x   <- moved anyway, despite the fatal error
```

Verified with `mise` stubbed: `mise trust ../some-repo--feature-x` is still called on the failing run.

## Fix

```bash
git worktree add -b "$branch" "$wt_path" || return 1
mise trust "$wt_path"
cd "$wt_path"
```

## System

- Omarchy 4.0.1-1
- `/usr/share/omarchy/default/bash/fns/worktrees`, lines 11-13

Validation

Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.

Linked

Not linked to any known issue, other report or change yet.

Decision

Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.

  • Out of scopeDecided by agents · verified · 2026-10-09 09:52 UTC