[parked] docs(design): plan removal of cold-turn startup costs (pi-acp probes, eager mount)#5221
[parked] docs(design): plan removal of cold-turn startup costs (pi-acp probes, eager mount)#5221mmabrouk wants to merge 2 commits into
Conversation
… eager mount) Plan two independent cold-turn startup fixes found by profiling the live local runner on 2026-07-11: removing the Pi adapter version probes (~1.6s) and deferring the eager durable mount on chat-only turns (~0.55-0.6s). Claude-Session: https://claude.ai/code/session_018MaXPNpvzN22kngHno3VMj
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
No pi-acp version newer than 0.0.31 exists and upstream HEAD still runs both probes, so the fix ships as a patched or pre-seeded adapter copy; the CLI honors a pre-seeded agent_processes/pi/ dir and the ACP registry pins the version, so snapshot pre-seeding is the Daytona delivery. Adds the upstream issue draft (Stage 2b), the 2.0s Daytona probe measurement, and the Pi install-skip interaction note. Claude-Session: https://claude.ai/code/session_018MaXPNpvzN22kngHno3VMj
|
Folded in the upstream pi-acp research Mahmoud asked for (commit b034041). What changed: No newer version fixes it. npm latest is 0.0.31 (2026-06-17), the same version the sandbox-agent CLI installs, and upstream HEAD ( But the version is effectively pinned, and there are clean delivery levers. The ACP registry entry pins Upstream is worth engaging. Open issue svkozak/pi-acp#70 already complains about the same update-check notice (on protocol grounds, not latency), and upstream has precedent for a settings-gated startup switch. Added Stage 2b: file the latency issue proposing Numbers updated. Daytona in-sandbox probes measured today at ~2.0s (two |
Symptom
On a cold turn (the first turn of a conversation), the agent takes about two seconds
longer to begin answering than the model itself needs. Profiling the live local runner on
2026-07-11 attributed the delay to two unrelated causes, and this PR is the plan to remove
both. It is a design-and-research PR: no code changes, only a planning workspace.
Measured causes
pi-acpadapter runs
pi --versiontwice andnpm view @earendil-works/pi-coding-agent versiononce, serialized before the first model request. Each
pi --versionis about 440ms; thenpm viewis about 230-280ms over the network. The runner already deletes the banner theseprobes produce (
services/runner/src/tracing/otel.ts), so it pays 1.6s to produce text itthrows away. The same probes run inside Daytona sandboxes, where
npm viewreaches npm froma European sandbox.
acquireEnvironment(
services/runner/src/engines/sandbox_agent.ts) mounts the durable working directory withgeesefs before opening the session, even on a chat-only turn that never touches a file.
What the plan contains
research.md: code-verified findings. The most important one: thepi-acpcopy that runsthe probes is very likely not the runner's patchable
pi-acp@0.0.29dependency. The@sandbox-agentCLI installs its own copy (0.0.31, floating range) from the ACP registryoutside the repo, and does the same inside Daytona. So the pnpm patch mechanism may not reach
the running copy, and definitely does not reach the sandbox copy.
plan.md: staged Fix A (turn onquietStartupwith no patch to remove one probe; remove theunconditional update-notice probe; retire the
otel.tsbanner-stripping; reach the Daytonacopy; add a timing regression guard), with Fix B deferred to a measured follow-up.
open-questions.md: the runtime facts that gate the work, chiefly which adapter copy runs.Verdict on Fix B
Fix B is genuinely complicated and the plan recommends shipping Fix A alone. The eager mount is
required, not incidental: workspace files (
AGENTS.md, skills, harness files) are written intothe mount so they persist, and a FUSE mount placed over a directory hides what it already held,
so a late mount would shadow those files and any the harness wrote. The safer "overlap the mount
with the harness cold start" variant is bounded by a timing window not yet measured. Details in
research.md.https://claude.ai/code/session_018MaXPNpvzN22kngHno3VMj