app-server fs/watch misses append updates to active rollout JSONL on macOS
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What issue are you seeing?
On macOS, app-server fs/watch does not emit fs/changed while an active Codex rollout JSONL is being appended to.
The rollout file size and modification time continue changing as reasoning, tool-call, and output items are written, but the app-server connection receives no corresponding fs/changed notification. A notification may appear around a user-message or turn boundary, but incremental turn items do not reliably trigger one.
This prevents clients that use the file notification as a signal to call thread/read from updating the active turn in real time.
What steps can reproduce the bug?
- Start
codex app-serverover stdio and sendinitialize. - Start or resume a thread and locate its active rollout JSONL under the Codex sessions directory.
- Subscribe to the exact absolute file path:
{ "method": "fs/watch", "id": 44, "params": {
"watchId": "0195ec6b-1d6f-7c2e-8c7a-56f2c4a8b9d1",
"path": "/absolute/path/to/rollout.jsonl"
} }
- Continue the turn so Codex appends reasoning, tool-call, command-output, and assistant-output records to the same file.
- Observe that the file size and mtime change, but no
fs/changednotification is emitted for those appends.
Control checks from the same machine:
- The same app-server watcher emits
fs/changedfor a newly created file in a watched temporary directory, so the subscription and connection are working. fswatchusing its default macOS backend also misses the active rollout appends.fswatch -m kqueue_monitoron the same rollout file reports every append immediately.
The FSEvents/kqueue comparison is diagnostic evidence, not a confirmed root cause.
What is the expected behavior?
After the watcher debounce interval, each modification or batch of modifications to the watched file should emit:
{ "method": "fs/changed", "params": {
"watchId": "0195ec6b-1d6f-7c2e-8c7a-56f2c4a8b9d1",
"changedPaths": ["/absolute/path/to/rollout.jsonl"]
} }
This should work for append-only writes while the writer keeps the file open, not only for create, replace, rename, or turn-boundary activity.
Additional information
- Codex CLI:
0.148.0(current latest release at time of report) - Platform:
Darwin 25.5.0 arm64 arm - macOS:
26.5.2(25F84) - Architecture: Apple Silicon
- Installation: Homebrew
codex doctor --json: app-server check is OK; the unrelated overall failure is only because the noninteractive diagnostic shell hasTERM=dumb.- The app-server documentation says watching a file emits
fs/changedfor that path. The observed behavior differs specifically for sustained append activity on the active rollout file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the app-server fs/watch implementation and reproduce the append-only rollout JSONL case on macOS, comparing its watcher behavior with fswatch -m kqueue_monitor. Trace how file modifications become fs/changed notifications and add or update coverage for sustained appends. Done means watched files emit the expected path notification after the debounce interval while they remain open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100