Just popping in on this old thread to say I had this local config corruption just yesterday. The ~/.fly/config.yml file appears to have been overwritten, and it starts off with F�^@'_/�y� i.e. it’s completely unreadable. I add this in case this is helpful for future bug-fixing.
My flyctl always auto-updated, and I would have used the command within the last couple of weeks. The state file indicates that it was version v0.3.224, so I wonder if a bug has been lurking for some years.
I expect the only binary that could have done this was flyctl itself, or the background agent. It looks like it was in the middle of a file locking operation, per some lock files in the ~/.fly folder:
usrnme@usrnme:~/Project$ ls -l ~/.flyold/
total 68
drwx------ 2 usrnme usrnme 4096 Nov 20 23:56 agent-logs
drwxrwxr-x 2 usrnme usrnme 4096 Nov 20 23:56 bin
-rw------- 1 usrnme usrnme 2536 Nov 27 23:01 config.yml
srwxrwxr-x 1 usrnme usrnme 0 Nov 20 23:56 fly-agent.sock
-rw------- 1 usrnme usrnme 0 Nov 25 2024 flyctl.agent.lock
-rw------- 1 usrnme usrnme 0 Nov 25 2024 flyctl.agent.start.lock
-rw------- 1 usrnme usrnme 0 Nov 25 2024 flyctl.cache.lock
-rw------- 1 usrnme usrnme 0 Nov 25 2024 flyctl.config.lock
drwx------ 2 usrnme usrnme 4096 Dec 7 22:10 logs
-rw------- 1 usrnme usrnme 291 Nov 27 15:50 state.yml
drwxrwxr-x 2 usrnme usrnme 4096 Nov 20 23:56 tmp
I appear to have good agent logs up until 2025/11/27, ditto command logs. I can see a good run previously, which puts this in command logs:
In a more recent run it stops at “DEBUG cache loaded.”, presumably because it cannot go any further. The machine here is a VirtualBox VM, and it is frequently paused and unpaused; I wonder if that upsets the agent, which is always running.