Repository navigation
Description
Summary
If a thread's worktree contains thousands of untracked files, that thread becomes very laggy in the BB UI. Threads in other environments stay responsive.
In our case, agents running a long QA loop saved screenshots and build output inside the worktree. Git ended up seeing about 7,000 untracked files. The environment status response grew to 1.5 MB, almost all of it a list of every changed file. BB fetches that status again whenever the worktree changes, and the agents kept writing files. The result was repeated server and host-daemon event loop stalls, plus a UI that was hard to use.
Versions and environment
- bb 0.46.1-nightly, macOS 15.6 on an 8-core Apple Silicon virtual machine
- Provider: OpenCode v2 plugin. This is probably provider-independent, since the status comes from the environment, not the provider.
- Git worktree environment. About 7,000 untracked files (roughly 2.4 GB of PNG, JSON, and TXT, plus built
.appbundles). Only 19 real tracked changes.
Steps to reproduce
- Create a thread in any git repo with a worktree environment.
- In that worktree, create a few thousand untracked files that are not gitignored:
mkdir -p qa-evidence for i in $(seq 1 7000); do echo "run $i" > "qa-evidence/shot-$i.txt"; done
- Check the size of the status response:
bb environment status <environment-id> --json | wc -c
- Keep the worktree changing, the way an agent does while it saves evidence:
while true; do date > "qa-evidence/live-$RANDOM.txt"; sleep 1; done
- Open the thread in the BB UI and use it: scroll, type, switch panels. Then do the same in a thread from another environment.
- Watch the server and host-daemon logs for
Event loop stalledlines.
Not yet run as written; this was put together from the real incident. In the incident, the files were PNG screenshots of about 0.1 to 3 MB each. Small text files should be enough to show the large payload. Large files may also be needed to trigger the watcher warnings.
Expected vs actual
expected: a thread in a worktree with thousands of untracked files stays about as responsive as any other thread. The status response stays small, for example counts plus a capped or paginated file list.
actual: the status response lists every file (1.5 MB for about 7,000 files, compared with a few KB for a normal worktree). The thread's UI lags badly, and the server and host daemon log repeated event loop stalls.
Evidence
bb environment status <env> --json: 1,465,322 bytes, withworkspace.workingTree.filesholding 6,953 entries (6,934 untracked). Two other environments on the same machine returned 588 bytes and 5 KB.- Host daemon log: 101
Host daemon event loop stalledwarnings in about 8 hours, the worst 3.5 s. AlsoWatcher subscription requires targeted recoverywithEvents were dropped by the FSEvents client. File system must be re-scanned. - Server log:
Event loop stalledentries whose in-flight work includesGET /api/v1/environments/<env>/statusfor this environment. - The affected thread was small: about 1,200 events and 14 turns. So its own timeline was not the cause.
What you ruled out
- Thread size and timeline cost. The thread was small, and other threads were fine.
- Model or provider latency.
- Machine load alone. Other threads on the same machine at the same time felt normal.
- Workaround: gitignore the generated folders, or write them outside the worktree. That fixes it for one project. BB still has no guard against agents that write a lot of generated files.
Activity
bb-slop-cop commentedon Oct 10, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotworkspaces,perf,partial-repro.Workspace.getStatusexpands and returns every untracked path; existing budgets limit line-stat reads, not the file list. The authored payload probe fails identically in both checkouts; all 35 existing workspace tests pass.Cap workspace status file lists and report the total count (get-bb#5494)