OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
omarchy-core medium occasional DISPUTE

Fix `Invalid TOML in config file: ~/.config/mise/config.toml` that keeps coming back

omarchyarchmisedesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Read omacom/omarchy#6948 in full with all four comments today. It supports the symptom, the cause and the byte arithmetic: TheTrueFerret reports the st" fragment and the in-place rewrite, reproduces entry loss with 16 concurrent writers on mise 2026.8.3, the maintainer triage names the two mise bugs, and saiqulhaq-hh reports 2,438 config writes in two minutes through an IDE polling the gh wrapper plus mise ERROR No version is set for shim: npm. I checked the byte math myself and it is right: [tools]\nclaude = "latest"\n is 26 bytes, [tools]\ngh = "latest"\n is 22, and offsets 22 to 25 of the longer file are st"\n. Both mise pull requests are merged (jdx/mise#12040 on 2026-08-15, jdx/mise#12069 on 2026-08-16) and both appear in the 2026.8.7 section of the mise CHANGELOG, with v2026.8.7 published 2026-08-17, so the version floor in the fix is correct. Confirmed on this machine: pacman -Qi mise-bin reports 2026.9.1-1 from Omarchy's own pacman repo and provides mise, mise --version prints 2026.9.1, omarchy update runs omarchy-update-system-pkgs and omarchy-update-mise, the generated wrappers in ~/.local/bin still carry a per-launch mise use -g, grep -h 'mise use -g' ~/.local/bin/* prints exactly one package name per wrapper as the fix claims, and mise use --help confirms mise use [TOOL@VERSION]... accepts several tools in one call. The per-launch write is still the shipped pattern: /usr/share/omarchy/bin/omarchy-mise-install on 4.0.2-1, the same file at quattro, and at v4.0.3 all emit mise use -g --quiet <package> in the wrapper, and the only v4.0.3 change there is command-name validation and quoting, so nothing on the Omarchy side has removed the writer. One claim does not hold. The verify field says nobody in the thread has yet posted a post-2026.8.7 result, but the last comment is dated 2026-08-20 on a machine upgraded 2026-08-19, which is after v2026.8.7 shipped, and it never names a mise version, so it can be read neither as a post-fix failure nor as absent. I rewrote verify to say what the thread actually supports, and rewrote the fix to keep everything that was right while adding that mise use -g restores only plain tool = "latest" entries, so per-tool options are lost unless copied back from the saved file. This workstation carries exactly that shape, a gemini entry with allow_builds, so the repair as written would have silently dropped it. Not exercised: I did not run mise use, did not write ~/.config/mise/config.toml, and did not reproduce the race, so the claim that 2026.8.7 closes it rests on the two merged pull requests and not on a measurement here.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.

Symptom

Every mise-backed tool (gh, claude, codex, opencode and the rest of the wrappers in ~/.local/bin) fails with:


mise::config::parse_error
Invalid TOML in config file: ~/.config/mise/config.toml
key with no value, expected `=`

The file ends in a fragment of a previous entry:


[tools]
gh = "latest"
st"

Deleting and recreating the file does not help, the fragment returns. The quieter form of the same bug is entries silently vanishing from [tools], so a tool that worked yesterday now says it is not installed, and mise shims for services break with mise ERROR No version is set for shim: npm. Reported on Omarchy 4.0 with mise 2026.8.3 and again on 4.0.0.alpha after the 2026-08-19 upgrade.

Cause

Two mise bugs, both established by the maintainers' triage and by the reporter, who wrote the upstream fix. Every wrapper omarchy-mise-install writes into ~/.local/bin runs mise use -g <tool> on every launch, which rewrites the whole global config.toml. Before mise 2026.8.7 that rewrite was in place rather than write-then-rename, so a shorter config written over a longer one left the tail of the old file behind: [tools]\nclaude = "latest"\n is 26 bytes, [tools]\ngh = "latest"\n is 22, and bytes 22 to 25 of the first are st". Underneath that, mise use -g read and wrote the file with no lock, so two wrappers starting together lost each other's entries. Anything that launches a wrapper at high frequency makes it worse: an IDE polling GitHub through the gh wrapper produced 2,438 writes in two minutes and emptied a five-tool config within seconds.

Fix

Both fixes are in mise 2026.8.7 (released 2026-08-17): #12040 writes the config atomically and #12069 takes a cross-process lock around the read, edit and save inside mise use. Omarchy ships mise as the mise-bin package from its own pacman repo, so update and confirm the version:


omarchy update
mise --version        # 2026.8.7 or later

A workstation updated on 2026-09-11 has mise-bin 2026.9.1-1, so a current install is already well past that floor.

Then repair the file. If it is invalid TOML, move it aside, list the packages your wrappers expect, and re-add them in one command:


mv ~/.config/mise/config.toml ~/.config/mise/config.toml.bad
grep -h 'mise use -g' ~/.local/bin/*      # one line per wrapper, naming its package
mise use -g gh claude codex               # the packages from that list

mise use -g writes plain tool = "latest" entries, so any per-tool options you had are not restored. Read ~/.config/mise/config.toml.bad and copy them back by hand. An entry of this shape is the case to watch for:


gemini = { version = "latest", allow_builds = ["@github/keytar", "node-pty"] }

If the file is valid but entries went missing, skip the mv and run only the mise use -g line with the missing packages.

Until the update has landed, launch wrapped tools one at a time rather than several at once. Two wrapper-side mitigations were posted in the thread (an flock around mise use -g, and skipping the write when mise ls --current <tool> already lists it) but each was confirmed by one person only, and omarchy update regenerates the wrappers over any edit.

Verify


mise --version
cat ~/.config/mise/config.toml   # valid TOML, every wrapped tool listed under [tools]
gh --version

The two merged mise pull requests are the confirmation that the cause is closed: the atomic write removes the st" fragment and the cross-process lock stops concurrent mise use -g runs losing each other's entries. The Omarchy issue is still open as of 2026-09-11 and its last comment is from 2026-08-20. No comment in the thread names a mise version at or above 2026.8.7, and that last report, on a machine upgraded 2026-08-19, does not say which mise it ran, so it settles nothing either way. Treat this as an upstream fix that shipped rather than as a confirmed field result, and check ~/.config/mise/config.toml again after a few days of normal use.

Sources

mise-config-toml-corrupted-by-wrapper-race