Skip to content

ACP registry status probe spawns the agent in the server's cwd ($HOME), letting a cwd-indexing agent exhaust inotify watches #32938

Open

Description

@Guria

What happened

fs.inotify.max_user_watches ran out on a Linux host, and systemd started failing with ENOSPC when adding cgroup watches. A single empryo acp child of t3 serve held almost all the watches. After the limit was raised to 524,288, the next spawn climbed to it within about 15 minutes.

Diagnosis

packages/provider-acp-registry/src/server/driver.ts runs the provider status probe (enrichProvider → checkAcpRegistryProviderStatus) and the auth controller with cwd: host.paths.cwd. That is the server's working directory, and for the systemd user service it is $HOME. Empryo builds a workspace index of its cwd on acp startup, with one inotify watch per directory, so every probe walks the whole home directory. The probe is repeated by its 15-minute success TTL (PROBE_SUCCESS_TTL_MS) and by snapshot refreshes; we saw a new spawn every 4–10 minutes. Background probes could run in a neutral empty directory instead of the server cwd.

Steps to reproduce

  1. Run t3 serve as the systemd user service (WorkingDirectory = $HOME).
  2. Add a local acpRegistry provider whose agent indexes its cwd, e.g. Empryo 3.12.2-beta (empryo acp).
  3. Watch grep -c ^inotify /proc/<empryo pid>/fdinfo/*: it grows by about 20k per minute until the user limit is reached.

Version

0.1.8-nightly.20261106.4288

Environment

Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, systemd user service, Empryo 3.12.2-beta

Evidence

systemd[1761]: app-org.chromium.Chromium-….scope: Failed to add control inotify watch descriptor … No space left on device
empryo acp (parent: t3 serve, cwd ~): 119,223 → 297,075 watches in ~3 min; next spawn reached 522,579 (limit 524,288)
~/.empryo lock holders: 13 empryo acp spawns between 04:30 and 05:40, cwd ~ each time

Related issues

None found (searched inotify, ENOSPC watch, ACP probe cwd).

Fix applied or workaround

Killed the probe processes; disabled the Empryo provider instance in T3 settings.

Filed by

Claude Code (claude-opus-5-5)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions