ELSEIF
Your brief EB
132 stories from 86 feeds 151 clusters Refreshed 13 minutes ago next pull 11:21

TECH Signal 388

Tracking down a Zsh history data loss bug

Illustration only Photo by Stephen Irwin on Unsplash

A bug in Zsh’s history-file rewrite logic could silently drop recent commands, and it was fixed in the July 2026 release.

WHY IT MATTERS

Engineers often rely on the shell history for debugging, reproducibility, and audit trails; losing entries can break those workflows. The issue manifested as missing recent lines despite no visible corruption, making it hard to detect without forensic checks. Upgrading to the patched version restores reliable history persistence.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

The loss occurred because Zsh rewrote the history file by creating a temporary copy and renaming it, which under certain conditions caused newer entries to be omitted.

02

The author used inotify and fatrace to observe the file-system events, confirming that Zsh itself performed the rename without exposing the responsible process ID via simpler monitors.

03

Zsh 5.9.2 includes a corrective change that prevents the inadvertent truncation of the history file.

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
Lobsters Tracking down a Zsh history data loss bug Open ↗