`whenWorkbenchRestored()` can be answered by the pre-reload document, so the
'Extension Host Restart' tests continued while the window was still reloading.
The next test then dispatched its command palette keybinding into a tearing
down window, `openQuickAccessWithRetry` exhausted its retries and fell through
to `type()`, which failed with a misleading 'set value ... after 20 seconds'.
Add `Code#reloadWindow()` which stamps the current document, triggers the
reload and waits for a new document before awaiting the workbench restore.
* chat: fall back to latest Copilot process log
Include the newest Copilot process log when no recent log matches the Agent Host session ID, or when the export has no active session context. Search only the ten newest logs while allowing streamed scans up to 1 GiB per file. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: address Copilot log export review
Apply the scan limits to the ten newest logs, avoid Copilot fallbacks for other local agents, and cap remote inline exports to prevent large renderer allocations. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Expand Agent Host file operation E2E coverage
Enable shell-backed Codex file scenarios and the five previously skipped Copilot variants with portable prompts, strict fixtures, and semantic AHP snapshots. Fix Codex command completion mapping when app-server drops item completion before the following response, and remove the resolved known-issue entries. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Clarify Agent Host E2E known issues
Keep the inventory focused on active gaps, remove resolved history and general test guidance, and align stale source comments with the current gates. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address Codex completion feedback
Restrict turn-snapshot recovery to command executions with observed outcomes, preserve response ordering around command preflights, and scope snapshot relaxation to Codex shell completion status where direct assertions prove behavior. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent host: integrate file coverage with main
Match strict tool-result assertions to each provider's file operation strategy and refresh generated Agent Host E2E coverage baselines. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent host: address E2E review feedback
Match snapshot omissions against provider tool names before normalization and add a direct execution oracle for spaced-filename reads. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent host: preserve E2E guidance after rebase
Retain newly landed prompt snapshot and cumulative-state assertion guidance while removing resolved file-operation gaps. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent host: adapt E2E coverage to latest Codex
Preserve Codex tool lifecycles across steering, adapt the spaced-path execution oracle to Codex 0.146, and refresh generated coverage baselines. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent host: refresh E2E coverage after conflict resolution
Regenerate the Agent Host E2E coverage summary after rebasing onto current main and validating the Codex steering lifecycle adaptation. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent host: make Codex path oracle shell-neutral
Correlate the Codex shell lifecycle by tool-call id and validate the semantic read command without requiring platform-identical quoting. Refresh the E2E coverage baseline. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Register user data sync utility channel
Ensure the Agents window exposes the renderer-owned user data sync utility channel to the shared process. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Revert unrelated README change
Keep the PR scoped to the user data sync channel fix. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: bump @github/copilot-sdk to 1.0.9-preview.3 and @github/copilot to 1.0.78
* Adapt agentHost to SDK 1.0.9-preview.3 type contract
SDK 1.0.9-preview.3 changed several session-events/rpc types consumed by
agentHost:
- Model dropped defaultReasoningEffort; pass undefined so the schema resolver
falls back (BYOK IByokLmModelInfo path is unaffected and keeps the field).
- Added factory permission kind; add 'factory' to the host permissionKind union.
- Added factory_completed system notification; handle it in the notification
switch with localized status messages.
- ShutdownData gained required fields; widen the test cast via unknown.
- PermissionPromptRequestPath dropped managedApprovalRequired; remove it from
the path promptRequest test literal (the permissionRequest still carries it,
which is what the host reads).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Adapt customizations test to new builtin skill in CLI 1.0.78
CLI 1.0.78 ships an additional builtin skill (github-pr-media) alongside
customize-cloud-agent; generalize the test's builtInCustomizations filter to
strip any @github/copilot builtin skill dir so discovery assertions stay green.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Regenerate Copilot prompt snapshots for CLI 1.0.78
CLI 1.0.78 reworded its baked-in system prompt (consolidated tips_and_tricks/SQL/session-context guidance and added the github-pr-media builtin skill), so the committed AHP prompt baselines no longer matched the wire prompt and the copilotPromptsE2E integration test failed in product build 461312. Regenerated the baselines via AGENT_HOST_UPDATE_AHP_SNAPSHOTS=1; all 21 cases pass in replay mode.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Paul <8560030+pwang347@users.noreply.github.com>
* Add deletion actions to automation run history
* Address automation history deletion review feedback
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: lazily restore peer chats
Keep restored peer chats as state-manager-owned entries and materialize their SDK histories only when content is requested. Consolidate per-session resume, sequencing, and teardown coordination so distinct peers can resume concurrently without racing session disposal.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: preserve peer restore failures
Propagate known peer-session resume failures so lazy chat hydration remains retryable instead of committing an empty history.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: increase agent host e2e coverage
Add coverage for server tools, customization discovery, persistence, peer chats, and changesets.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: fix agent host e2e CI failures
Make persistence assertions path-identity safe on Windows, remove timing-based restart waits, wait deterministically for server tool advertisement, preserve teardown tracking through assertions, and clarify the addComment range contract.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: serialize agent session release and restore
Track in-flight provider releases so restoration cannot race provider shutdown. Strengthen persistence coverage to prove complete durable transcript reconstruction before restarting the host.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: fix persistence oracle typing
Read optional response-part IDs through Reflect so both the TypeScript compiler and hygiene rules accept the durable reconstruction oracle.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: stabilize server tool catalog assertion
Read the authoritative session snapshot with bounded retry so the test handles server-tool advertisement that occurs before or after the client begins observing actions.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Stamp the locked Copilot runtime and SDK versions into product metadata so the native About dialog can report the exact bundled packages in both source and packaged builds.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require confirmation for git show --output
Share the existing Git auto-approval rules across workbench and Agent Host,
and deny automatic approval when git show writes through --output.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bda42f98-e73f-417f-b7e6-03cff9e2f604
* agentHost: update Codex to 0.146.0
Update the packaged Codex runtime and protocol-generation pin together, regenerate the app-server types, and adapt the handwritten integration to the updated schema.
* sessions: add per-session Codex model providers
Expose ChatGPT account state and subscription usage, add provider-qualified Copilot and ChatGPT model inventories, persist selections per session, and route Codex requests through each session's selected provider.
* sessions: simplify provider account usage
* agentHost: fix Codex model provider E2E expectation
* agentHost: Track tool result size
Add a serialized result-size measurement to languageModelToolInvoked so Agent Host telemetry preserves tool response-size analysis without duplicating the legacy event schema.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Add model to tool telemetry
Track the resolved usage model and turn identifier on Agent Host tool invocation events. Preserve Auto as the selection kind while applying the existing trusted, BYOK, and unknown model privacy treatment.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Wait for resolved tool model
Defer tool invocation telemetry until usage supplies the resolved model, with turn-end fallback and explicit cleanup for chat, session, and subagent disposal paths.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>