Invalid mise config.toml keeps getting generated
System details
Omarchy 4.0, Ryzen 7 5800x
What's wrong?
I'm getting this error constantly on Omarchy:
mise::config::parse_error
Invalid TOML in config file: ~/.config/mise/config.toml
key with no value, expected =
The config ends up containing:
[tools] gh = "latest" st"
The st" line is invalid TOML.
I've deleted the config and recreated it, but the faulty st" entry keeps coming back. I also checked my shell configuration and Omarchy's mise integration, but haven't been able to figure out what is actually producing this line.
It could potentially be related to GitHub/mise/Omarchy, but I'm honestly not sure — it's a pretty weird one.
Environment: Arch Linux / Omarchy / Bash / mise /usr/bin/mise
Any ideas on what could be generating this malformed entry?
My logs if they are usefull: omarchy-debug.log
Tracked this down — it is a write race on the config, and the st" line is the tell.
What writes the file: every wrapper omarchy-mise-install generates into ~/.local/bin (claude, codex, gh, gemini, opencode, …) runs mise use -g on every launch:
#!/bin/bash
export MISE_MINIMUM_RELEASE_AGE=0
mise use -g "gh" || exit 1
exec mise x "gh" -- "gh" "$@"
mise use -g rewrites the whole ~/.config/mise/config.toml and takes no lock, so launching two of these close together makes them race.
Why st" specifically: the rewrite happens in place, not via temp-file-and-rename — the inode does not change across a mise use -g:
inode before: 3973 size: 26
inode after: 3973 size: 40
So a shorter config written over a longer one leaves the old tail behind. [tools]\nclaude = "latest"\n is 26 bytes; [tools]\ngh = "latest"\n is 22; bytes 22–25 of the first are st"\n. That is your exact line — it is the tail of a claude = "latest" entry that got half-overwritten by a shorter write.
It keeps coming back because recreating the config does not stop the wrappers from racing on it the next time two tools start together.
The quieter half of the same bug: most of the time the race just loses entries instead of producing invalid TOML. Worth checking on your box — I had 13 wrappers in ~/.local/bin but only 3 tools left in config.toml:
ls ~/.local/bin; cat ~/.config/mise/config.toml
Reproduced with 16 concurrent writers on mise 2026.8.3, a 3-tool config came back with 1.
Workaround until this is fixed — serialize the write in the wrappers:
cd ~/.local/bin
for f in *; do
grep -q 'mise use -g' "$f" || continue
sed -i 's|^\(\s*\)mise use -g |\1flock "$HOME/.config/mise/.config.lock" mise use -g |' "$f"
done
Note omarchy update regenerates these wrappers, so it will need reapplying until the fix lands. Any tools already lost from config.toml come back with a single mise use -g <tools...>.
Opened #6964 with the fix.
Okay after looking actually trying to find out why writing to the config would break it... T3 code apparently was writing to it twice really short after each other... so it is something to fiks in Mise :)
Tracked down, and it is two bugs in mise rather than one in Omarchy.
The st" you are seeing. mise only started writing the global config atomically in jdx/mise#12040, merged on 15 August, which is not in v2026.8.6 or any earlier release. Until that ships, a shorter config written over a longer one leaves the tail of the old one behind — which is exactly the fragment in your file, and why deleting the config does not help: the next concurrent pair of tool launches recreates it.
The one underneath it. mise use -g reads the config and writes it back with no lock across the two, so two tool wrappers starting at once lose each other's entries. Ten rounds of six concurrent launches dropped entries in half of them, one losing three of six.
Both are written up here, and jdx is picking it up: https://github.com/jdx/mise/discussions/12067
Worth knowing that the atomic-write fix alone will make your symptom disappear without fixing the cause — invalid TOML becomes silently missing tools. The upstream thread makes that case.
Leaving this open until a mise release carrying both lands in Omarchy. In the meantime, launching wrapped tools one at a time rather than several at once avoids it.
Independent confirmation on Omarchy 4.0.0.alpha (upgraded 2026-08-19), plus a data point on how bad this gets when anything launches the wrappers at high frequency.
Orca IDE on this machine polls GitHub PR state through the gh wrapper. An inotify watch on ~/.config/mise/config.toml logged 2,438 modifications in roughly two minutes, with ~1,900 fresh mise use -g gh processes captured in the accompanying process snapshots. Under that write pressure a freshly restored 5-tool config (node, fnox, terraform, codex, gh) was reduced to just gh = "latest" within seconds — repeatedly. The first wipe landed 11 minutes after the v4 migrations ran, and every manual restore since was eaten within hours. Losing the node entry also breaks mise shims for background services (mise ERROR No version is set for shim: npm), so the blast radius is bigger than the config file itself.
Until the mise-side fix lands, a wrapper-side mitigation lighter than locking has held up here: skip the write entirely when the tool is already configured —
#!/bin/bash
export MISE_MINIMUM_RELEASE_AGE=0
mise ls --current gh 2>/dev/null | grep -q . || mise use -g "gh" || exit 1
exec mise x "gh" -- "gh" "$@"
Steady state then performs zero global-config writes (and skips a per-launch version check); mise use -g only runs on first launch or after the entry has been lost. It doesn't close the first-launch race, but it takes the per-launch writer count to zero, which is what makes high-frequency callers like IDE pollers safe. Verified here: config stable under the same Orca polling that previously wiped it within seconds.
The mise release this was waiting on has shipped, and it fixes both halves of this. Checked on a fresh worker built from the current Omarchy ISO, which ships mise-bin 2026.9.11.
- Lost entries. Eight
mise use -grunning at once against an empty global config, 20 rounds per version: mise 2026.8.6 dropped entries in 5 and then 8 rounds of 20; 2026.8.8 and 2026.9.11 kept all eight every round. jdx/mise#12069 mademise uselock, re-read and save under the lock. - The
st"fragment. 2026.8.6 rewritesconfig.tomlin place (the inode is unchanged across a write), which is what lets a shorter config leave the tail of a longer one behind. 2026.9.11 replaces the file (a new inode each write), per jdx/mise#12040, so a torn file can no longer happen.
Both landed in mise v2026.8.7, whose binaries never published; v2026.8.8 is the first release carrying them. Anyone on a current Omarchy has it. An existing broken config is not repaired by the update: delete the stray line, and re-add any tool that went missing with mise use -g <tool>.
The wrappers still run mise use -g on every launch, which is now safe but slow and is tracked separately in #11886; #9596 removes those per-launch writes altogether. Nothing found in Omarchy itself still produces this symptom in practice: the remaining config writers outside mise use (omarchy-install-dev-env's mise settings add and mise tool-alias set, and one migration's sed -i) run once, on request, rather than on every launch.
Reviewed by Claude Opus 5.5 and, as a second opinion, Codex Medium, which agreed the cause and the fix are upstream and contributed the residual-writers check above; it could not reach the GitHub API and read the pages instead, and its independence is not guaranteed. This is waiting on the maintainer to decide whether to close it.