Repository navigation
agent host: adopt AHP one-time triggers for scheduled chats - #348240
Merged
Megan Rogge (meganrogge) merged 6 commits intoNov 13, 2026
Merged
Megan Rogge (meganrogge) merged 6 commits into
Megan Rogge (meganrogge) merged 6 commits into
Conversation
Sync AHP with the upstreamed one-time trigger (microsoft/agent-host-protocol#603) and drop the local protocol patch. VS Code-only scheduled-chat state (purpose, existing-chat target, admission and dispatch receipts, existing-chat support) moves into namespaced _meta, the session origin keeps purpose as a VS Code extension member, and conditional updates are removed. Hosts migrate previously stored top-level fields on load. Co-authored-by: Copilot <[email protected]>
…crosoft/vscode into agents/adopt-ahp-one-time-triggers
Co-authored-by: Copilot <[email protected]>
AHP one-time triggers reuse misfirePolicy and allow any ISO 8601 runAt. Skip occurrences missed while unavailable, accept explicit UTC offsets, and normalize run times to UTC. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical defects allow manual runs to cancel scheduled occurrences, malformed follow-ups to start new sessions, and concurrent edits to be silently overwritten.
9 open issues
Manual runs must not consume ordinary one-time automations · New Reject malformed scheduled-chat conversation targets · New Use atomic revision checks to prevent overwriting concurrent edits · New Accept offset-bearing ISO 8601 runAt timestamps · New Allow multiple triggers on ordinary automations · New Allow rescheduling ordinary one-time automations after execution · New Normalize or reject legacy scheduled-chat definitions at admission · New Honor skip policy for missed one-time triggers · New Add a negotiated adapter for legacy VS Code scheduled chats · New
What changed in this PR
Adopts upstream Agent Host Protocol (AHP) one-time triggers for Automations and Send Later, replacing the local protocol patch while retaining VS Code-specific scheduled-chat behavior.
Changes:
- Syncs AHP 1.2 definitions and makes the sync script’s local patch optional.
- Moves scheduled-chat purpose, targets, receipts, and capabilities into typed metadata helpers.
- Migrates stored automations and runs, and updates client projections, documentation, and tests.
| File | Description |
|---|---|
src/vs/workbench/contrib/sessions/providers/agentHost/browser/baseAgentHostSessionsProvider.ts |
Uses the typed scheduled-chat origin reader. |
src/vs/workbench/contrib/sessions/providers/agentHost/browser/agentHostAutomationStore.ts |
Updates metadata serialization, projection, and capability checks. |
src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts |
Uses the origin helper in cached-session fixtures. |
src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostAutomationStore.test.ts |
Updates capability, target, and receipt fixtures. |
src/vs/sessions/AUTOMATIONS.md |
Documents metadata encoding and storage migration. |
src/vs/platform/agentHost/test/node/agentHostAutomationService.test.ts |
Adds migration and metadata-immutability coverage. |
src/vs/platform/agentHost/node/protocolServerHandler.ts |
Advertises existing-chat scheduling through initialize metadata. |
src/vs/platform/agentHost/node/agentService.ts |
Uses typed automation origins and exposes existing-chat support. |
src/vs/platform/agentHost/node/agentHostAutomationService.ts |
Uses metadata-backed scheduling state and migrates legacy records. |
src/vs/platform/agentHost/common/state/protocol/version/registry.ts |
Updates the protocol version to 1.2.0. |
src/vs/platform/agentHost/common/state/protocol/common/commands.ts |
Adopts upstream one-time capability definitions. |
src/vs/platform/agentHost/common/state/protocol/channels-session/state.ts |
Removes the private purpose field from generated origins. |
src/vs/platform/agentHost/common/state/protocol/channels-automation/state.ts |
Adopts standard one-time triggers and removes private fields. |
src/vs/platform/agentHost/common/state/protocol/channels-automation/actions.ts |
Removes private purpose and conditional-update fields. |
src/vs/platform/agentHost/common/state/protocol/channels-automation-run/state.ts |
Updates trigger-origin documentation and removes private run purpose. |
src/vs/platform/agentHost/common/state/protocol/.ahp-version |
Records the synced upstream revision. |
src/vs/platform/agentHost/common/meta/vscode/agentHostAutomationsMeta.ts |
Adds scheduled-chat metadata readers, writers, and origin helpers. |
src/vs/platform/agentHost/common/meta/agentHostAutomationsMeta.ts |
Re-exports the new metadata helpers. |
src/vs/platform/agentHost/common/agentService.ts |
Adds the existing-conversation support property. |
src/vs/platform/agentHost/common/agentHostExtensionProtocol.ts |
Types the new initialize metadata flag. |
scripts/sync-agent-host-protocol.ts |
Applies the local overlay only when present. |
scripts/agent-host-protocol.patch |
Deletes the superseded protocol overlay. |
Review effort: Max
A malformed existing-chat target in _meta must not silently fall back to creating a new session. Co-authored-by: Copilot <[email protected]>
Megan Rogge (meganrogge)
marked this pull request as ready for review
November 13, 2026 20:23
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ulugbek Abdullaev (@ulugbekna)Matched files:
Ben Villalobos (@benvillalobos)Matched files:
|
Drop the dispatched/rejected receipts: run lifecycle and session linkage already show whether a one-time message was sent. Merge the scheduled-chat marker and existing-chat target into one _meta entry and keep only the admitted-run id. Co-authored-by: Copilot <[email protected]>
Megan Rogge (meganrogge)
merged commit Nov 13, 2026
e3d8e29
into
connor4312/ahp-1.1-transition
2 of 4 checks passed
Megan Rogge (meganrogge)
deleted the
agents/adopt-ahp-one-time-triggers
branch
November 13, 2026 21:47
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.


Adopts the upstreamed one-time trigger (microsoft/agent-host-protocol#603) on top of #348236, replacing the local protocol patch that preserved the Send Later edits from #347963.
What changed
scripts/sync-agent-host-protocol.tsagainst AHPmain(f1f4d4ac) and deletedscripts/agent-host-protocol.patch. The sync script now applies that patch only when it exists.oneTimetriggers andautomations.oneTime. Generic "run once" automations also useoneTimetriggers, so a scheduled chat can't be inferred from the trigger. The VS Code-only state moves into namespaced_metathrough helpers inagentHostAutomationsMeta.ts:vscode.scheduledChaton definition and run_meta.vscode.scheduledChatConversationon definition_meta.vscode.oneTimeReceiptson entry_meta.vscode.scheduledChatExistingConversationinitialize_metaflag.AutomationSessionOriginhas no_meta, sopurposestays on the session origin as a typed VS Code extension member (IAgentHostAutomationSessionOrigin).expectedModifiedAtis removed, per AHP review. The host still rejects edits once a one-time run has been admitted, and it now rejects updates that change scheduled-chat purpose or target through_meta._metaon load, so already-scheduled chats keep working.Testing
pnpm run typecheck-client: passed.pnpm run oxlint <changed files>: passed../scripts/test.sh --reporter dotwithagentHostAutomationService,agentHostAutomationStore,localAgentHostSessionsProvider,automationTools,scheduledChatsService,automationRunner,cloudAutomationStore,protocolServerHandler,agentHostAutomationsMeta,agentHostCatalogProjection, andautomationsView: 1879 passing, 12 pending.No manual UI validation was done.