Conversation
…y cache Every created session wrote its agent's slash-command list into the per-config machine capability row. That list depends on the project directory, so each session started in another project rewrote the whole 25-40 KB row and synced it to every workspace client. Probing builtin Claude and Codex from four directories showed availableCommands was the only field that changed; configOptions, models and modes were identical. The capability row now keeps one base list per source version, owned by probes. A created session records only its project's additions and removals in an `acpCommandScope` Flock row keyed by local project id or GitHub repo, and composers merge that delta over the base. Replaying real probe output, a project switch syncs 0-12.5 KB once per project instead of 29-42 KB every time. Deleting an agent config removes its scope rows. Capability writes now log source, outcome, changed fields, bytes and cumulative counters; session runtime-config snapshot writes log a per-turn count. `lody machine list --include-acp-capabilities` shows the scope rows. Also records the per-model ACP controls proposal, updated with this measurement. Model: claude-opus-5-5[1m] Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Problem / pressure
Every created session wrote its agent's slash-command list into the per-config machine capability row (
['acpCapability', configId]). That list depends on the project directory the session runs in, so every session started in a different project rewrote the whole 25–40 KB row and synced it to every client in the workspace (one dev machine: 207 whole-row writes on 2026-09-25; rows total ~700 KB).Probing builtin Claude and Codex from four directories (home, this repo, two others) showed
availableCommandswas the only field that changed.configOptions(including everycurrentValue),modelsandmodeswere byte-identical. Claude: 105 common commands + 0–7 per project. Codex: 75 common + 0–32 per project.Summary
availableCommandsbelongs to probes. A created session keeps the stored list for the samesourceVersion, and only seeds it when none exists, as before.['acpCommandScope', configId, scopeKey]holds{ sourceVersion, added, removed }. The key islocal:<localProjectId>orgithub:<owner/repo>. The value has no timestamp, so repeat sessions in a project write nothing. An empty delta deletes the row, and a session that reported no commands leaves it alone.MachineViewMeta.acpCommandScopes. The session composer, draft tabs and chat landing pass their project's key, andresolveAvailableCommandsmerges the delta only when itssourceVersionmatches the base.[acp-capabilities] writedebug line on every write attempt: source, outcome, changed fields, bytes, scope outcome, and cumulative counters since daemon start.[acp-runtime-config] writedebug line withwritesThisTurn.lody machine list --json --include-acp-capabilitiesnow includes the scope rows.goalActions, so a change there alone is no longer skipped.proposed), updated with this measurement. The measurement showed its "snapshot stabilization" idea saves nothing.Decision record:
.agents/notes/implemented/architecture/2026-09-27-acp-command-scope-rows.md.Visual explanation
Before / after
Measured by replaying real probe output through
computeAcpCommandScopeDelta:Test plan
corepack pnpm typecheck: pass.corepack pnpm lint: 0 errors.vitest run:packages/shared108 files,apps/cli284 files (1 skipped),packages/components526 files, all passing.MachineDocumenttests run against an in-memory Flock. Each new mechanism was ablated and its test failed: keeping the base, the source-version gate, and the probe/session split.resolveAvailableCommands.pnpm run docs check: no errors.pnpm check/test:cisequence; real-traffic write counts (the new log line collects them).Mixed versions: composers built before this change read only the base list, so they lose project-specific commands from the slash menu until they update. Typing a command still reaches the agent. New composers with an old daemon see no scope rows and behave as today.
Context handoff
Internal same-repository branch.
🤖 Generated with Claude Code