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-361GitHub issuePublicDecided· Out of scope

omarchy-restart-shell kills the running shell before checking it can relaunch it: a stale HYPRLAND_INSTANCE_SIGNATURE leaves the session with no shell

Reported by DanielThyselius · filed Sep 18, 2026Closed upstream on 2026-10-12 by the bot omarchybot, as a duplicate (target not recorded).

Decided: Out of scope — decided by agents · verified 3 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

omarchy-restart-shell kills the running shell before checking it can relaunch it: a stale HYPRLAND_INSTANCE_SIGNATURE leaves the session with no shellrevision 1 · captured 2026-09-28 21:23 UTC via poll

What happened

Running omarchy restart shell from a terminal whose HYPRLAND_INSTANCE_SIGNATURE names an
instance that no longer exists kills the running shell and never starts a new one. The session is
left with no bar and no shell until it is relaunched by hand; the command reports only:

Omarchy shell did not become ready after restart.

The two halves of the restart do not agree on how they reach the session:

  • the kill — quickshell kill -p "$CONFIG_DIR" --any-display — matches on the Wayland display, so

it works regardless of the signature, and it did kill the live shell;
- the relaunch — hyprctl dispatch 'hl.dsp.exec_cmd("omarchy-launch-shell")' — goes through the
Hyprland socket named by HYPRLAND_INSTANCE_SIGNATURE, which was dead, so nothing was launched.

hyprctl reports that failure clearly, but the script discards it:

$ HYPRLAND_INSTANCE_SIGNATURE=dead_instance_0000 hyprctl dispatch 'hl.dsp.exec_cmd("true")'
Couldn't connect to /run/user/1000/hypr/dead_instance_0000/.socket.sock. (4)
$ echo $?
4
# omarchy-restart-shell
hyprctl dispatch 'hl.dsp.exec_cmd("omarchy-launch-shell")' >/dev/null   # exit status ignored

The script does derive a signature from the newest instance runtime dir, but only when the
variable is empty:

if [[ -z ${HYPRLAND_INSTANCE_SIGNATURE:-} ]]; then
  hypr_dir=$(find "${XDG_RUNTIME_DIR:-/run/user/$UID}/hypr" ... )
  [[ -n $hypr_dir ]] && export HYPRLAND_INSTANCE_SIGNATURE=${hypr_dir##*/}
fi

A value that is set but dead therefore goes unchecked, and it is the case that costs the user their
shell — an unset one is handled.

In the session where this happened, the terminal's environment named an instance ~11 days older
than the live one, while systemctl --user show-environment had the correct, live value. I did not
establish how the terminal's copy went stale, and the bug does not depend on that: any dead value
reproduces it.

The journal shows the whole sequence — the old shell exits on the IPC kill, and no new instance
ever logs anything:

omarchy-shell[3217226]: INFO: Exiting due to IPC request.
(no further omarchy-shell entries)

Expected

Either the shell comes back, or the running shell is left alone. Being killed and not replaced is
the one outcome that should not be possible — a restart that cannot relaunch should fail before it
kills anything.

Steps to reproduce

export HYPRLAND_INSTANCE_SIGNATURE=dead_instance_0000   # any instance that is gone
omarchy restart shell

The bar disappears and does not return; the command prints "Omarchy shell did not become ready
after restart". Recovery:

HYPRLAND_INSTANCE_SIGNATURE=$(systemctl --user show-environment | sed -n 's/^HYPRLAND_INSTANCE_SIGNATURE=//p') \
  hyprctl dispatch 'hl.dsp.exec_cmd("omarchy-launch-shell")'

Suggested fix

Validate the signature before the kill, and treat a set-but-dead value like an unset one:

  1. probe the socket (hyprctl version >/dev/null 2>&1, or test

$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket.sock);
2. if it fails, fall back to systemctl --user show-environment, then to the newest instance dir —
the existing find already does the last part;
3. if no signature works, exit before killing, saying so;
4. check the relaunch dispatch's exit status rather than sending it to /dev/null, so the failure
is reported where it happens instead of 2 seconds later as a timeout.

System

  • omarchy 4.0.2-1
  • Hyprland 0.56.2 (commit efb5099, v0.56.2 branch)
  • Quickshell shell from /usr/share/omarchy/shell
  • omarchy debug --no-sudo --print output available on request; nothing in it is specific to this

failure, which is entirely in omarchy-restart-shell's control flow.


Filed by Claude Opus 5 via Claude Code.

View raw text
## What happened

Running `omarchy restart shell` from a terminal whose `HYPRLAND_INSTANCE_SIGNATURE` names an
instance that no longer exists kills the running shell and never starts a new one. The session is
left with no bar and no shell until it is relaunched by hand; the command reports only:

```
Omarchy shell did not become ready after restart.
```

The two halves of the restart do not agree on how they reach the session:

- the kill — `quickshell kill -p "$CONFIG_DIR" --any-display` — matches on the Wayland display, so
  it works regardless of the signature, and it did kill the live shell;
- the relaunch — `hyprctl dispatch 'hl.dsp.exec_cmd("omarchy-launch-shell")'` — goes through the
  Hyprland socket named by `HYPRLAND_INSTANCE_SIGNATURE`, which was dead, so nothing was launched.

`hyprctl` reports that failure clearly, but the script discards it:

```bash
$ HYPRLAND_INSTANCE_SIGNATURE=dead_instance_0000 hyprctl dispatch 'hl.dsp.exec_cmd("true")'
Couldn't connect to /run/user/1000/hypr/dead_instance_0000/.socket.sock. (4)
$ echo $?
4
```

```bash
# omarchy-restart-shell
hyprctl dispatch 'hl.dsp.exec_cmd("omarchy-launch-shell")' >/dev/null   # exit status ignored
```

The script does derive a signature from the newest instance runtime dir, but only when the
variable is **empty**:

```bash
if [[ -z ${HYPRLAND_INSTANCE_SIGNATURE:-} ]]; then
  hypr_dir=$(find "${XDG_RUNTIME_DIR:-/run/user/$UID}/hypr" ... )
  [[ -n $hypr_dir ]] && export HYPRLAND_INSTANCE_SIGNATURE=${hypr_dir##*/}
fi
```

A value that is set but dead therefore goes unchecked, and it is the case that costs the user their
shell — an unset one is handled.

In the session where this happened, the terminal's environment named an instance ~11 days older
than the live one, while `systemctl --user show-environment` had the correct, live value. I did not
establish how the terminal's copy went stale, and the bug does not depend on that: any dead value
reproduces it.

The journal shows the whole sequence — the old shell exits on the IPC kill, and no new instance
ever logs anything:

```
omarchy-shell[3217226]: INFO: Exiting due to IPC request.
(no further omarchy-shell entries)
```

## Expected

Either the shell comes back, or the running shell is left alone. Being killed and not replaced is
the one outcome that should not be possible — a restart that cannot relaunch should fail before it
kills anything.

## Steps to reproduce

```bash
export HYPRLAND_INSTANCE_SIGNATURE=dead_instance_0000   # any instance that is gone
omarchy restart shell
```

The bar disappears and does not return; the command prints "Omarchy shell did not become ready
after restart". Recovery:

```bash
HYPRLAND_INSTANCE_SIGNATURE=$(systemctl --user show-environment | sed -n 's/^HYPRLAND_INSTANCE_SIGNATURE=//p') \
  hyprctl dispatch 'hl.dsp.exec_cmd("omarchy-launch-shell")'
```

## Suggested fix

Validate the signature **before** the kill, and treat a set-but-dead value like an unset one:

1. probe the socket (`hyprctl version >/dev/null 2>&1`, or test
   `$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket.sock`);
2. if it fails, fall back to `systemctl --user show-environment`, then to the newest instance dir —
   the existing `find` already does the last part;
3. if no signature works, exit before killing, saying so;
4. check the relaunch dispatch's exit status rather than sending it to `/dev/null`, so the failure
   is reported where it happens instead of 2 seconds later as a timeout.

## System

- omarchy 4.0.2-1
- Hyprland 0.56.2 (commit efb5099, v0.56.2 branch)
- Quickshell shell from `/usr/share/omarchy/shell`
- `omarchy debug --no-sudo --print` output available on request; nothing in it is specific to this
  failure, which is entirely in `omarchy-restart-shell`'s control flow.

---

Filed by Claude Opus 5 via Claude Code.

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 15:23 UTC