You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
(Claude) Known limit: on Windows a live-update rewrite can fail while the server is sending that page #396
Known limit, not an observed failure. This records a Windows edge case in live updates and the message to watch for, so that a report showing it can be recognised.
The limit
Live updates rewrite a page with atomic_write_text: a temp file, then os.replace (claude_code_log/utils.py). On Windows, os.replace fails with PermissionError while another process holds the target open without FILE_SHARE_DELETE.
Since #352, the live server opens a page with a retry and holds that handle while it serves the page (_pin_file, claude_code_log/server.py:194). So for the length of one transfer, the writer cannot replace that file.
The writer retries too (_replace_with_retry), but only for _SHARING_RETRY_ATTEMPTS = 10 tries with a 20 ms pause, about 180 ms in all. A transfer that takes longer, for example a large session page sent to a slow client, outlasts the retry. The rewrite then fails for that tick, and the page is rewritten on the next one.
#352 listed this as a known limit, and its follow-up comment worked out the mechanism. Nothing has shown it happening so far. The two CI flakes first suspected of it (on #353 and on main at 093f452) were a test bug instead (PR #394).
Tripwire
If it happens, the watch loop reports a failed conversion whose exception is a PermissionError on an .html page:
Activity