050. Linux and macOS differ in the cache folders and the open files of agents
- Date
- 2026-10-30
- Agents
- none named
- Measured on
- CI runner ubuntu-22.04, ubuntu-24.04, ubuntu-26.04 (x64); CI runner ubuntu-22.04-arm, ubuntu-24.04-arm, ubuntu-26.04-arm (arm64); CI runner macos-15, macos-26 (arm64); CI runner macos-15-intel, macos-26-intel (x64)
Measured
2026-10-30, the scenario scenarios/first-run.sh <agent> <command> in the
scenarios workflow (run 41137353062), with a throwaway HOME, no login and
no key. The agents and versions are in facts 29, 30 and 46. The scenario
lists the open files of the agent processes with open_files from
probes/lib.sh: on Linux it reads /proc/<pid>/fd, on macOS it runs
lsof -n -P -p <pid>.
Measured on: CI runner ubuntu-22.04, ubuntu-24.04, ubuntu-26.04 (x64); CI runner ubuntu-22.04-arm, ubuntu-24.04-arm, ubuntu-26.04-arm (arm64); CI runner macos-15, macos-26 (arm64); CI runner macos-15-intel, macos-26-intel (x64). The three Linux versions gave the same files. The four macOS images gave the same files, except the CPU name in the paths.
What was measured
The paths are relative to HOME.
- GitHub Copilot CLI 1.0.105 keeps its native package in a cache folder
whose path holds the version:
- Linux:
.cache/copilot/pkg/linux-<cpu>/1.0.105/. The process holdsinuse.<pid>.holdin that folder open. - macOS:
Library/Caches/copilot/pkg/darwin-<cpu>/1.0.105/. The open files areinuse.<pid>.holdand, inprebuilds/darwin-<cpu>/,cli-native.node,runtime.node,msal-node-runtime.nodeandlibmsalruntime_<cpu>.dylib. On both,<cpu>isx64orarm64, and the process also holds.copilot/session-state/<session id>/inuse.<pid>.holdand.copilot/logs/process-<milliseconds>-<pid>.logopen.
- Linux:
- Kimi Code CLI 2.4.1 keeps a cache of native modules in
.cache/kimi-code/native/on Linux and inLibrary/Caches/kimi-code/native/2.4.1/darwin-<cpu>/<hex>/on macOS. On macOS, the process holds.kimi-code/config.toml,.kimi-code/workspaces.jsonand aclipboard.darwin-<cpu>.nodefile from that cache open. On Linux, no file belowHOMEwas open. - Qwen Code 0.26.4 holds
.qwen/settings.json,model-registry.json,installation_id,output-language.md,tip_history.jsonandextension-store/state.jsonopen on macOS. On Linux, no file belowHOMEwas open, on each of the six Linux labels. Fact 30 says that Qwen Code holds such files open on both runners. This run shows them on macOS only. - Kilo Code CLI 7.8.18 also makes
.local/state/kilo/and.cache/kilo/.metadata_never_indexon macOS. On Linux, these two do not exist. - These agents use the same folders on Linux and macOS, also the XDG
folders below
HOMEon macOS: Amp (.cache/amp,.local/share/amp), Goose (.local/share/goose,.local/state/goose), Crush (.local/share/crush), Kilo Code CLI (.local/share/kilo,.config/kilo), Cline CLI, Continue CLI, Factory Droid, Auggie, Claude Code, Cursor CLI and Gemini CLI. Codex CLI and opencode were not compared: the number of files that they make changes from run to run. - The scrub changes a path below
~that is not hidden to/work/example. On macOS,actions/setup-nodeputs Node.js below~/hostedtoolcache, so the scrubbed process lines shownode /work/examplein place of the path of the agent script. On Linux, the path is/opt/hostedtoolcache/..., and the scrub keeps it.
Mechanism
lsof on macOS lists the files that a process maps into memory (for
example .node and .dylib files) and the files that it watches through
kqueue. /proc/<pid>/fd on Linux lists only open file descriptors. A file
watch on Linux uses inotify, which holds no descriptor for the file. This
is the probable cause of items 2 and 3: the agent watches its settings
files. It was not checked with a trace.
A tool that finds an agent by its open files must expect fewer files on
Linux than on macOS. The inuse.<pid>.hold files of Copilot CLI appear on
both, so they are a stable link from a process to its session (fact 30)
and to its version.
Incident
None.
Screens
None. The output is in the log of the run.
Not measured
- A trace of the system calls, to confirm the file watch.
- The open files on Windows.
- Whether Copilot CLI removes the old version folder after an update.
- The open files after a login, when more files exist.