Repository navigation
agentHost: bound and deduplicate AHP transport logging - #341868
Merged
roblourens merged 1 commit intoOct 15, 2026
Merged
Conversation
Restrict default capture to Insiders and enforce a shared 500 MiB process budget across reconnects without additional filesystem accounting. Keep one capture owner per route: the window for ordinary connections and the host for Mission Control. Forward startup enablement, mirror live owner configuration, and use authorized host resources for Mission Control log viewing and export. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Large host-log reads can disconnect Mission Control lanes, and remote wire logs lose automatic viewer updates.
2 open findings
What changed in this PR
Bounds AHP transport logging and assigns capture to one endpoint, while making Mission Control host logs available to the viewer and export.
Changes:
- Adds a shared 500 MiB process budget and Insiders-only default capture.
- Removes duplicate host capture and forwards startup/live settings.
- Adds host-log discovery, inspection filtering, and regression coverage.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/cloudSandboxAgentHostService.test.ts |
Tests capture ownership. |
src/vs/workbench/contrib/chat/test/browser/exportAgentHostDebugLogs.test.ts |
Tests Mission Control export. |
src/vs/workbench/contrib/chat/test/browser/agentHostLogSources.test.ts |
Tests host-log discovery and reads. |
src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.ts |
Disables duplicate Mission Control client capture. |
src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.ts |
Adds host-capture guidance. |
src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.ts |
Allows viewing host-owned logs independently. |
src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.ts |
Uses connection-aware viewer enablement. |
src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.ts |
Discovers advertised host logs. |
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts |
Removes relocated setting registration. |
src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.ts |
Exports Mission Control host resources. |
src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts |
Tests log metadata without management access. |
src/vs/platform/agentHost/test/node/nodeAgentHostStarter.test.ts |
Tests startup setting forwarding. |
src/vs/platform/agentHost/test/node/missionControlHost.test.ts |
Tests capture defaults and live settings. |
src/vs/platform/agentHost/test/common/ahpJsonlLogger.test.ts |
Tests budgets and inspection exclusion. |
src/vs/platform/agentHost/node/webSocketTransport.ts |
Removes generic host-side capture. |
src/vs/platform/agentHost/node/protocolServerHandler.ts |
Advertises optional log-directory metadata. |
src/vs/platform/agentHost/node/nodeAgentHostStarter.ts |
Forwards capture enablement at launch. |
src/vs/platform/agentHost/node/missionControl/missionControlHost.ts |
Applies host capture settings and metadata. |
src/vs/platform/agentHost/node/agentHostServerMain.ts |
Removes WebSocket logger setup. |
src/vs/platform/agentHost/node/agentHostMain.ts |
Removes duplicate capture wiring. |
src/vs/platform/agentHost/LOCAL_ENDPOINT.md |
Documents ownership, budgets, and access. |
src/vs/platform/agentHost/electron-main/electronAgentHostStarter.ts |
Forwards desktop capture enablement. |
src/vs/platform/agentHost/common/meta/vscode/agentHostDebugLogsMeta.ts |
Adds validated log-directory metadata helpers. |
src/vs/platform/agentHost/common/meta/agentHostDebugLogsMeta.ts |
Exposes metadata helpers. |
src/vs/platform/agentHost/common/ahpJsonlLogger.ts |
Enforces shared budgets and excludes inspection traffic. |
src/vs/platform/agentHost/common/agentHostStarter.config.contribution.ts |
Registers capture defaults and local synchronization. |
src/vs/platform/agentHost/common/agentHostSchema.ts |
Adds read-only capture configuration. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
roblourens
marked this pull request as ready for review
October 15, 2026 21:42
roblourens
enabled auto-merge (squash)
October 15, 2026 21:42
Aaron Munger (amunger)
approved these changes
Oct 15, 2026
roblourens
deleted the
roblou/agents/ahp-logging-restrictions-internal-users
branch
October 15, 2026 22:18
This was referenced Oct 20, 2026
Ross Wollman (rwoll)
added a commit
that referenced
this pull request
Oct 29, 2026
Corrects or removes stale and misleading statements in agent skills, instructions and architecture docs. I compared the 1000 most recent `microsoft/vscode` Copilot Memories with the docs and checked every conflict against the current code. Each change replaces or removes a single statement; no new guidance was added. The last column tags the author of the commit that introduced each changed statement (bulk prose-unwrap commits are skipped). Please update or revert after merge if anything here is wrong. ## Changes | File | Correction | Evidence | Last modified by | |---|---|---|---| | `src/vs/sessions/skills/troubleshoot/SKILL.md` | AHP wire logging is on by default in Insiders, not off by default | `ahpJsonlLogger.ts` `isAhpJsonlLoggingEnabled`; default changed in #341868 | @vijayupadya | | `.github/skills/otel/SKILL.md`, `src/vs/platform/agentHost/OTEL.md` | The runtime version is `copilotRuntimeVersion` in `package.json`; `package-lock.json` has no `@github/copilot` entry | `package.json`, `build/gulpfile.vscode.ts` | @zhichli | | `.github/skills/agent-host-e2e-tests/SKILL.md` | `hostOnlyTest(...)` is now `conformanceTest(...)` / `providerHostOnlyTest(...)` | `e2eTestContext.ts` | @roblourens | | `smoke-tests`, `flaky-smoke-tests`, `agent-host-e2e-tests` skills | The runtime is the native `copilot-runtime` from `@github/copilot-sdk-<platform>`, not the `@github/copilot` CLI | `copilotRuntimePaths.ts` | @pwang347 | | `src/vs/platform/agentHost/AGENTS.md` | Managed filesystem sandbox lists *are* resolved by `SandboxSettingsResolutionHelper`: a managed grant list replaces the local one, and denied paths are combined | `sandboxSettingsResolutionHelper.ts`, `sessionSandbox.ts` | @dileepyavan | | `.github/skills/code-oss-logs/SKILL.md` | `scripts/code.sh` defaults to `code-oss-dev` in the platform app-data dir; `~/.vscode-oss-dev` is only the `launch.json` profile | `userDataPath.ts`, `.vscode/launch.json` | @roblourens | | `MISSION_CONTROL.md` | Each relay gets its own `ProtocolServerHandler` instance rather than sharing the local handler | `missionControlHost.ts` `_attachRelay` | @roblourens | | `.github/skills/agent-host-logs/SKILL.md` | `_ahpLog.ts` is when the logging process handled the message, not the time it was sent | `ahpJsonlLogger.ts` | @roblourens | | `.github/skills/chat-customizations-editor/SKILL.md` | Remove the stale "currently gated fixtures" list; none of those fixtures is gated anymore | `aiCustomizationManagementEditor.fixture.ts` (`blocksCi: false`) | @joshspicer | | `.github/skills/customizations-in-the-agent-host/SKILL.md` | Generated protocol files are changed upstream and synced with `scripts/sync-agent-host-protocol.ts`, not "backported" | `common/state/AGENTS.md` | @connor4312 | | `ux-css-layout` skill | Point to `dom.DisposableResizeObserver` instead of a raw `ResizeObserver` | `dom.ts` | @mrleemurray | | `.github/copilot-instructions.md` | Use `DisposableResizeObserver`'s `resizeObserverCtor` test seam as the example | `dom.ts` | @bryanchen-d | | `design-tokens.instructions.md`, `ux-css-layout` skill | `vscode-known-variables.json` lists are regenerated by `./scripts/test-documentation.sh` and are not alphabetically maintained by hand; CSS-only properties go in `"others"` | `colorRegistry.releaseTest.ts`, `validateVariableNames.ts` | @mrleemurray | | `.agents/skills/launch/SKILL.md` | Replace the stale `transpile-client` unit-test prep with `build-fast -- --client-only` | `.github/copilot-instructions.md`, `unit-tests` skill | @roblourens | ## Testing Documentation only. No tests were run. *🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
Dmitrii F. (lingeniare)
pushed a commit
to lingeniare/vegaide
that referenced
this pull request
Nov 7, 2026
Corrects or removes stale and misleading statements in agent skills, instructions and architecture docs. I compared the 1000 most recent `microsoft/vscode` Copilot Memories with the docs and checked every conflict against the current code. Each change replaces or removes a single statement; no new guidance was added. The last column tags the author of the commit that introduced each changed statement (bulk prose-unwrap commits are skipped). Please update or revert after merge if anything here is wrong. ## Changes | File | Correction | Evidence | Last modified by | |---|---|---|---| | `src/vs/sessions/skills/troubleshoot/SKILL.md` | AHP wire logging is on by default in Insiders, not off by default | `ahpJsonlLogger.ts` `isAhpJsonlLoggingEnabled`; default changed in microsoft/vscode#341868 | @vijayupadya | | `.github/skills/otel/SKILL.md`, `src/vs/platform/agentHost/OTEL.md` | The runtime version is `copilotRuntimeVersion` in `package.json`; `package-lock.json` has no `@github/copilot` entry | `package.json`, `build/gulpfile.vscode.ts` | @zhichli | | `.github/skills/agent-host-e2e-tests/SKILL.md` | `hostOnlyTest(...)` is now `conformanceTest(...)` / `providerHostOnlyTest(...)` | `e2eTestContext.ts` | @roblourens | | `smoke-tests`, `flaky-smoke-tests`, `agent-host-e2e-tests` skills | The runtime is the native `copilot-runtime` from `@github/copilot-sdk-<platform>`, not the `@github/copilot` CLI | `copilotRuntimePaths.ts` | @pwang347 | | `src/vs/platform/agentHost/AGENTS.md` | Managed filesystem sandbox lists *are* resolved by `SandboxSettingsResolutionHelper`: a managed grant list replaces the local one, and denied paths are combined | `sandboxSettingsResolutionHelper.ts`, `sessionSandbox.ts` | @dileepyavan | | `.github/skills/code-oss-logs/SKILL.md` | `scripts/code.sh` defaults to `code-oss-dev` in the platform app-data dir; `~/.vscode-oss-dev` is only the `launch.json` profile | `userDataPath.ts`, `.vscode/launch.json` | @roblourens | | `MISSION_CONTROL.md` | Each relay gets its own `ProtocolServerHandler` instance rather than sharing the local handler | `missionControlHost.ts` `_attachRelay` | @roblourens | | `.github/skills/agent-host-logs/SKILL.md` | `_ahpLog.ts` is when the logging process handled the message, not the time it was sent | `ahpJsonlLogger.ts` | @roblourens | | `.github/skills/chat-customizations-editor/SKILL.md` | Remove the stale "currently gated fixtures" list; none of those fixtures is gated anymore | `aiCustomizationManagementEditor.fixture.ts` (`blocksCi: false`) | @joshspicer | | `.github/skills/customizations-in-the-agent-host/SKILL.md` | Generated protocol files are changed upstream and synced with `scripts/sync-agent-host-protocol.ts`, not "backported" | `common/state/AGENTS.md` | @connor4312 | | `ux-css-layout` skill | Point to `dom.DisposableResizeObserver` instead of a raw `ResizeObserver` | `dom.ts` | @mrleemurray | | `.github/copilot-instructions.md` | Use `DisposableResizeObserver`'s `resizeObserverCtor` test seam as the example | `dom.ts` | @bryanchen-d | | `design-tokens.instructions.md`, `ux-css-layout` skill | `vscode-known-variables.json` lists are regenerated by `./scripts/test-documentation.sh` and are not alphabetically maintained by hand; CSS-only properties go in `"others"` | `colorRegistry.releaseTest.ts`, `validateVariableNames.ts` | @mrleemurray | | `.agents/skills/launch/SKILL.md` | Replace the stale `transpile-client` unit-test prep with `build-fast -- --client-only` | `.github/copilot-instructions.md`, `unit-tests` skill | @roblourens | ## Testing Documentation only. No tests were run. *🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
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.

Summary
Prevent AHP reconnect loops from producing unbounded JSONL logs and avoid capturing the same traffic at both endpoints.
The budget is per process, not machine-wide, and resets on window/host restart. No linked issue was supplied; this addresses a reported reconnect loop producing excessive AHP logs.
Validation
npm run build-fast -- --client-only— passed, including a refresh after formatting.npm run typecheck-client— passed.git diff --name-only -z -- '*.ts' | xargs -0 npm run eslint --— passed for all 26 changed TypeScript files.npm run eslint -- src/vs/platform/agentHost/node/protocolServerHandler.ts src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.ts— passed after formatting.git diff --cached --check— passed.Exact focused test command
Result: 759 passed, 7 pending. Reused the completed run because subsequent changes were verified formatting-only.
Live UI/mobile Mission Control flows and full integration/smoke suites were not run.
Manual verification
(Written by Copilot)