Repository navigation
protocol: add optional initial chat titles - #526
Merged
Don Jayamanne (DonJayamanne) merged 5 commits intoOct 17, 2026
Merged
Conversation
Add an optional createChat title and initialTitle capability, regenerate client models, and cover cross-language round trips and constructor compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Define composed fork acceptance and rejection semantics while preserving legacy initialMessage behavior. Update generated client models, schemas, documentation, and round-trip coverage. Refs microsoft/vscode#341229 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Connor Peet (connor4312)
requested changes
Oct 13, 2026
Keep title optional without new capabilities or naming mandates. Reuse normal turn errors for initial messages and regenerate the schemas and clients. Update compatibility fixtures and the TypeScript round-trip dispatcher. Addresses review on #526; companion implementation microsoft/vscode#341230. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Don Jayamanne (DonJayamanne)
added a commit
to microsoft/vscode
that referenced
this pull request
Oct 13, 2026
Use the existing fork capability and optional title field. Report initial-message failures in the target turn and persist rejected turns across reload. Remove special rejection draft recovery while keeping unknown-outcome inspection and no-resend behavior. Replicates microsoft/agent-host-protocol#526 review changes for #341230. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove redundant creation prose, the generated Kotlin source-order test, and per-client changelog fragments. Keep the shared title change note, native constructor compatibility coverage, and protocol definitions unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Don Jayamanne (DonJayamanne)
requested a review
from Connor Peet (connor4312)
October 14, 2026 12:36
Don Jayamanne (DonJayamanne)
marked this pull request as ready for review
October 14, 2026 12:36
Don Jayamanne (DonJayamanne)
requested a review
from roblourens
as a code owner
October 14, 2026 12:36
Connor Peet (connor4312)
previously approved these changes
Oct 14, 2026
Preserve initial-title round-trip coverage alongside upstream subscription, reconnect, and TCP fixtures. Regenerate protocol outputs without restoring removed review-only tests or per-client changelogs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Don Jayamanne (DonJayamanne)
enabled auto-merge
October 17, 2026 00:05
Connor Peet (connor4312)
approved these changes
Oct 17, 2026
Don Jayamanne (DonJayamanne)
deleted the
copilot/fork-prompt-exploration-ahp
branch
October 17, 2026 05:19
Don Jayamanne (DonJayamanne)
added a commit
to microsoft/vscode
that referenced
this pull request
Oct 18, 2026
* agentHost: support named fork titles Carry optional fork titles through Agent Host transports and both VS Code session surfaces, advertise support explicitly, and preserve ordinary forks for older hosts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: update fork test for connections service Adapt the named-fork slash-command test to the new Agent Host connections service constructor dependency introduced upstream. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: support prompted forks Add prompt-bearing Agent Host forks, preserve source-turn context, generate context-aware titles, and expose completion templates with argument hints and recovery behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: adapt fork title test to utility model service Use the upstream utility-model test adapter after rebasing prompted forks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: distinguish fork completion descriptions Localize the named and prompted fork descriptions for #341229. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: preserve fork context and drafts across asynchronous creation Address review feedback for #341230: resolve streaming fork boundaries, retain inherited agent selection, identify in-flight operations without serializing attachments, parse prefixed titles, and protect edited attachment drafts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix fork CI regressions after upstream sync Guard fork-only draft inspection before accessing the composer. Update title tests for normalized storage and explicit user title ownership, and correct test formatting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: drain session metadata before idle eviction Wait for pending normalized metadata and migration writes before dropping resident state, scoped to the released session. Preserve write error reporting and cover command and client renames across restoration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: align fork titles and errors with protocol review Use the existing fork capability and optional title field. Report initial-message failures in the target turn and persist rejected turns across reload. Remove special rejection draft recovery while keeping unknown-outcome inspection and no-resend behavior. Replicates microsoft/agent-host-protocol#526 review changes for #341230. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: drop changes unrelated to named and prompted forks Revert 29e29e2 (session metadata drain before idle eviction). The race it fixes is reached through the pre-existing rename paths and is independent of forking; it is tracked separately. Also remove the unused startClientTurnMessage overload, collapse the single-field ICapturedForkInitialMessage wrapper, drop a stray blank line, and right-size the fork accessibility help to match the surrounding entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: surface the real cause when a prompt fork fails The unknown-outcome notification hid the underlying error, so definite pre-creation failures (for example "Wait for workspace setup to finish") were reported only as an unknown outcome. Include the cause in the message. Inspect Target waited for a chat that may never appear and then returned silently. Report that failure instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: persist only rejections the submitter cannot recover Rejected turns were made durable for every chat so a rejected fork prompt would survive a reload. Ordinary rejections leave the message in the client's composer, so persisting them kept records nothing needs. Follow the resumable precedent on the error variant: the rejected variant now carries recoverable, producers default to recoverable, and only the create-chat initial message opts out. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert "agentHost: drop the session metadata drain" Restores 29e29e2. CI proves the drain is load-bearing for this branch: runs 508c2b9 and 30baf6d (no drain) failed `peer chat catalog and transcript survive a host restart`, 29e29e2 (drain) was fully green, and 4aeb97e (drain reverted) failed again on Linux and Windows. The same test passes on contemporaneous unrelated pull requests. The underlying race is pre-existing and remains tracked separately, but this branch triggers it reliably, so the ordering fix stays here. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: drain session catalog writes before idle release Keep legacy chat restoration from reading an older catalog while an accepted rename is still being synchronized. Drain the session's catalog and passive metadata writes before releasing it, and scope their rejecting peer-write barriers to that session. Cover compatibility-storage renames and scoped write errors. Keep the existing restart assertion unchanged and synchronize the ordered-catalog test on its actual summary notification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Add an optional initial display title to
createChat, supporting named forks in Agent Host clients.createChat.titlewithout a new capability or prescribed title-formatting/naming behavior.initialMessagefield for prompted forks; no new RPC error.Tracks microsoft/vscode#341229.
Companion implementation: microsoft/vscode#341230.
Compatibility
Older hosts can ignore the optional title field. Source-based creation continues to use the existing
forkandsideChatcapabilities; there are no additional title or initial-message capabilities and no protocol version bump.The title remains a trailing optional constructor property where supported. The shared change fragment covers the protocol and generated clients; there are no per-client migration changelogs.
Validation
Latest three-comment review cleanup:
npm run generate— passed; no changes to tracked canonical types, schemas, or native client outputs.npm test— typecheck, lint, release metadata, changelog/fragments, and generated-output checks passed. The final test invocation was blocked by the localnpxexecutable's execute permission.git diff --check— passed.git diff --exit-code -- types schema clients— passed after generation; the review cleanup changes no protocol or generated SDK code.CreateChatParams— identical. These deleted docs/test/changelog files have no VS Code vendored counterpart, so no VS Code source change is required.Earlier validation on the same protocol/native-client code (not rerun for this docs/test deletion): TypeScript client 77 tests/build, Rust workspace tests, Go tests, and Swift build passed. Swift tests were blocked by missing XCTest; Kotlin and .NET toolchains were unavailable locally. Fresh PR CI remains the cross-language confirmation.