agent-ecosystem/test/main
777genius 5d63ecfe32 perf: scope team file watching to active and engaged teams
The main process watched every team directory under ~/.claude/teams (one shallow
chokidar target per team root, per team inboxes, and per task dir). On macOS this
falls back to kqueue, which needs one fd per watched file, so a workspace with
many teams kept ~1600 descriptors open and made startup and reconcile work scale
with the number of teams on disk.

Scope the team-root and task watching to teams that are running or currently
engaged in the UI. The teams root and every team's inboxes are still watched for
all teams, so cross-team message delivery, the lead inbox->stdin relay, and
notifications are unchanged. Idle teams are static, so dropping their team-root/
task watches is safe; opening a team (getData) or launching it re-adds it via an
immediate watch-scope refresh. The provider falls back to watching every team
when unset, and the EMFILE polling fallback is intentionally left unscoped so a
scope change can never look like a deletion.

Measured on a 162-team workspace: open team fds 1600 -> 730, with team-root
watching restored the moment a team is opened or goes live.
2026-05-30 00:25:55 +03:00
..
build chore: checkpoint existing workspace changes 2026-05-23 13:48:35 +03:00
features perf: include process table usage metrics 2026-05-29 12:34:13 +03:00
http feat(team): improve runtime provider workflows 2026-05-17 19:11:26 +03:00
ipc fix(startup): serialize provider runtime checks 2026-05-26 09:12:05 +03:00
services perf: scope team file watching to active and engaged teams 2026-05-30 00:25:55 +03:00
utils fix(provenance): classify synthetic user turns 2026-05-26 23:51:17 +03:00
sentry.test.ts chore: checkpoint frontend workspace updates 2026-05-18 01:57:16 +03:00