Add history.clearContext and Tool.isTerminal across all SDKs - #2129
Add history.clearContext and Tool.isTerminal across all SDKs#2129examon wants to merge 5 commits into
history.clearContext and Tool.isTerminal across all SDKs#2129Conversation
There was a problem hiding this comment.
Pull request overview
Adds Node SDK support for clearing session context and terminal tools.
Changes:
- Adds
Tool.isTerminaland forwards it during create/resume. - Adds generated
history.clearContextRPC types and client method.
Show a summary per file
| File | Description |
|---|---|
nodejs/src/types.ts |
Exposes terminal-tool configuration. |
nodejs/src/client.ts |
Serializes isTerminal in session requests. |
nodejs/src/generated/rpc.ts |
Adds context-clearing RPC support. |
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 1
- Review effort level: Medium
history.clearContext and Tool.isTerminalhistory.clearContext and Tool.isTerminal across all SDKs
There was a problem hiding this comment.
Review details
Files not reviewed (4)
- go/rpc/zrpc.go: Generated file
- go/rpc/zsession_encoding.go: Generated file
- go/rpc/zsession_events.go: Generated file
- go/zsession_events.go: Generated file
Comments suppressed due to low confidence (5)
java/src/main/java/com/github/copilot/rpc/ToolDefinition.java:87
- The ergonomic annotation path cannot configure this new flag.
@CopilotToolcurrently exposes override, permission, and defer options, andCopilotToolProcessorforwards each one, but neither has anisTerminalmember. Users defining tools through the documented annotation API therefore cannot declare terminal tools; add the annotation property and processor wiring (with processor coverage).
@JsonProperty("skipPermission") Boolean skipPermission, @JsonProperty("defer") ToolDefer defer,
@JsonProperty("isTerminal") Boolean isTerminal) {
rust/src/types.rs:352
Toolis#[non_exhaustive]and its docs direct consumers to the fluent builder, but this new option has nowith_is_terminalmethod. Every adjacent runtime hint does (with_overrides_built_in_tool,with_skip_permission, andwith_deferattypes.rs:455-477), and the customDebugimplementation attypes.rs:496-511also omits this field. Please integrateis_terminalinto both APIs so consumers do not have to switch to post-construction mutation and diagnostics show the configured value.
#[serde(default, skip_serializing_if = "is_false")]
pub is_terminal: bool,
java/src/main/java/com/github/copilot/rpc/ToolDefinition.java:73
- Java currently receives only the terminal-tool half of this cross-SDK feature. Unlike Node, Python, Go, Rust, and .NET in this diff,
SessionHistoryApistill has noclearContextmethod andSessionEventhas no typedsession.context_clearedevent, so Java consumers cannot implement the context-clearing example. Regenerate the Java RPC/event surface from the updated runtime schemas as well.
This issue also appears on line 86 of the same file.
* @param isTerminal
* when {@code true}, a successful call to this tool ends the agent
* turn: the runtime's tool phase halts instead of feeding the result
* back to the model for another round; {@code null} or {@code false}
* leaves the turn running
python/copilot/tools.py:129
- The public
define_toolsignature now acceptsis_terminal, but itsArgssection documents every option except this one. Add its turn-ending semantics and default to the docstring so decorator and function-style users can discover the option throughhelp()and generated API documentation.
is_terminal: bool = False,
go/types.go:1185
- The PR description says this is “Two small additions to the Node SDK,” lists only three Node files, and reports only npm validation, but the actual change adds public/generated surfaces across Rust, Python, Java, Go, and .NET as well. Please either scope the diff back to Node or update the description and validation evidence for every affected SDK so the review and release impact are accurate.
// IsTerminal reports that a successful call to this tool ends the agent
// turn: the runtime halts instead of feeding the result back to the model
// for another round. A failed call leaves the loop running so the model can
// read the error and retry.
IsTerminal bool `json:"isTerminal,omitempty"`
- Files reviewed: 11/24 changed files
- Comments generated: 0 new
- Review effort level: Medium
There was a problem hiding this comment.
Review details
Files not reviewed (4)
- go/rpc/zrpc.go: Generated file
- go/rpc/zsession_encoding.go: Generated file
- go/rpc/zsession_events.go: Generated file
- go/zsession_events.go: Generated file
Comments suppressed due to low confidence (3)
nodejs/src/client.ts:1394
- The new create/resume forwarding is untested even though
nodejs/test/client.test.tshas paired request-payload tests for the adjacentoverridesBuiltInToolanddeferflags. Add equivalent create and resume assertions forisTerminalso a missing serialization path cannot regress unnoticed.
isTerminal: tool.isTerminal,
python/copilot/client.py:1877
- There is no test covering this new wire serialization, while
python/test_client.pyalready verifies both create and resume forwarding for the neighboring override/defer flags. Add correspondingis_terminal=Truetests for both paths (and omission at the default) to protect the advertised behavior.
if tool.is_terminal:
definition["isTerminal"] = True
java/src/main/java/com/github/copilot/rpc/ToolDefinition.java:87
- The Java portion still does not expose
history.clearContextor the typedsession.context_clearedevent promised for every SDK.SessionHistoryApicurrently ends withsummarizeForHandoff, andSessionEventhas no context-cleared subtype, so Java consumers cannot use either new generated surface. Please regenerate and commit the Java RPC request/result/API and session-event classes as well.
@JsonProperty("skipPermission") Boolean skipPermission, @JsonProperty("defer") ToolDefer defer,
@JsonProperty("isTerminal") Boolean isTerminal) {
- Files reviewed: 12/25 changed files
- Comments generated: 0 new
- Review effort level: Medium
There was a problem hiding this comment.
Review details
Files not reviewed (4)
- go/rpc/zrpc.go: Generated file
- go/rpc/zsession_encoding.go: Generated file
- go/rpc/zsession_events.go: Generated file
- go/zsession_events.go: Generated file
Comments suppressed due to low confidence (2)
java/src/main/java/com/github/copilot/rpc/ToolDefinition.java:87
- Java's annotated-tool surface cannot set this new flag.
@CopilotToolexposes the other tool flags (overridesBuiltInTool,skipPermission, anddefer), but the annotation and processor still emit only the seven-argument constructor, so every annotation-defined tool getsisTerminal = null. Please add anisTerminalannotation member and carry it throughCopilotToolProcessor, with processor coverage, so the feature is available through the SDK's ergonomic tool API rather than only direct record construction.
@JsonProperty("skipPermission") Boolean skipPermission, @JsonProperty("defer") ToolDefer defer,
@JsonProperty("isTerminal") Boolean isTerminal) {
python/copilot/tools.py:129
is_terminalis a new public argument but is missing from the function'sArgsdocumentation, while every other option is documented there. Add its successful-call/failed-call behavior to the docstring so users can discover the flag without reading the dataclass source.
is_terminal: bool = False,
- Files reviewed: 12/30 changed files
- Comments generated: 0 new
- Review effort level: Medium
There was a problem hiding this comment.
Review details
Files not reviewed (4)
- go/rpc/zrpc.go: Generated file
- go/rpc/zsession_encoding.go: Generated file
- go/rpc/zsession_events.go: Generated file
- go/zsession_events.go: Generated file
Comments suppressed due to low confidence (3)
java/src/main/java/com/github/copilot/rpc/ToolDefinition.java:95
- The Java surface still lacks the other half of this PR:
SessionHistoryApihas noclearContextmethod/request/result types, and there is no typedsession.context_clearedevent. As a result, Java consumers cannot use the capability that the PR promises for every SDK. Please regenerate and commit the Java RPC and event sources from the updated schema.
@JsonProperty("metadata") Map<String, Object> metadata, @JsonProperty("isTerminal") Boolean isTerminal) {
python/copilot/client.py:2250
- Please add a unit test that exercises
is_terminalthroughdefine_tooland verifies bothsession.createandsession.resumepayloads, including omission when false. The adjacent metadata test covers this same serialization path, but these new branches and helper propagation currently have no Python coverage.
if tool.is_terminal:
definition["isTerminal"] = True
dotnet/src/Client.cs:2790
- The added tests only verify the intermediate
AIFunction.AdditionalProperties; they do not exercise this conversion or the serialized session request. Please add coverage asserting thatisTerminalreaches bothsession.createandsession.resumepayloads (and is omitted by default), otherwise the actual wire path can regress while the current tests still pass.
var isTerminal = function.AdditionalProperties.TryGetValue(CopilotTool.IsTerminalKey, out var terminalVal) && terminalVal is true;
return new ToolDefinition(function.Name, function.Description, function.JsonSchema,
overrides ? true : null,
skipPerm ? true : null,
defer,
metadata,
isTerminal ? true : null);
- Files reviewed: 13/26 changed files
- Comments generated: 0 new
- Review effort level: Medium
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Review details
Files not reviewed (4)
- go/rpc/zrpc.go: Generated file
- go/rpc/zsession_encoding.go: Generated file
- go/rpc/zsession_events.go: Generated file
- go/zsession_events.go: Generated file
Comments suppressed due to low confidence (2)
dotnet/src/Client.cs:2790
- The added tests stop at the
AIFunction.AdditionalPropertiesbag, so they do not exercise this conversion or the serializedsession.create/session.resumepayload. This new bridge is whereis_terminalbecomes wire-levelisTerminal; add a public-API client test using the existing fake server pattern inClientSessionLifetimeTeststhat asserts both requests containtools[0].isTerminal == trueand that the property is omitted when unset.
var isTerminal = function.AdditionalProperties.TryGetValue(CopilotTool.IsTerminalKey, out var terminalVal) && terminalVal is true;
return new ToolDefinition(function.Name, function.Description, function.JsonSchema,
overrides ? true : null,
skipPerm ? true : null,
defer,
metadata,
isTerminal ? true : null);
python/copilot/client.py:2250
- Add Python regression coverage for this new wire mapping.
python/test_client.py:574-609already verifies the analogousmetadataoption on both create and resume, but no test currently exercisesis_terminal; a future edit could silently drop either branch or emit the wrong camel-case key. CoverTrueon both paths and omission for the defaultFalse.
if tool.is_terminal:
definition["isTerminal"] = True
- Files reviewed: 13/26 changed files
- Comments generated: 1
- Review effort level: Medium
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Review details
Files not reviewed (4)
- go/rpc/zrpc.go: Generated file
- go/rpc/zsession_encoding.go: Generated file
- go/rpc/zsession_events.go: Generated file
- go/zsession_events.go: Generated file
Suppressed comments (3)
python/copilot/client.py:2250
- This new wire mapping has no regression coverage in Python.
python/test_client.py:574-609already verifies the equivalent metadata option on bothsession.createandsession.resume, including omission when unset; add matchingis_terminalcoverage so either duplicated serialization branch cannot regress.
if tool.is_terminal:
definition["isTerminal"] = True
dotnet/src/Client.cs:2790
- The added tests only verify that
CopilotToolOptionswrites the internalis_terminaladditional-property key; they do not exercise this conversion into the wireToolDefinition. Add a public-API fake-server test that inspects bothsession.createandsession.resumepayloads (and the unset case), since this mapping is the step that actually emitsisTerminalto the runtime.
var isTerminal = function.AdditionalProperties.TryGetValue(CopilotTool.IsTerminalKey, out var terminalVal) && terminalVal is true;
return new ToolDefinition(function.Name, function.Description, function.JsonSchema,
overrides ? true : null,
skipPerm ? true : null,
defer,
metadata,
isTerminal ? true : null);
java/src/main/java/com/github/copilot/rpc/ToolDefinition.java:398
- This method is introduced by this PR, but its Javadoc says it has existed since 1.0.7. That gives consumers incorrect version-availability information; set
@sinceto the first Java SDK release that will actually containisTerminal.
* @since 1.0.7
- Files reviewed: 13/26 changed files
- Comments generated: 0 new
- Review effort level: Balanced
This comment has been minimized.
This comment has been minimized.
76eae0c to
3b9b97a
Compare
There was a problem hiding this comment.
Review details
Files not reviewed (4)
- go/rpc/zrpc.go: Generated file
- go/rpc/zsession_encoding.go: Generated file
- go/rpc/zsession_events.go: Generated file
- go/zsession_events.go: Generated file
Suppressed comments (1)
python/copilot/client.py:2275
- Add a Python regression test for this forwarding path.
python/test_client.py:614-649already verifies the analogousmetadataoption on bothsession.createandsession.resume, but there is no test foris_terminalanywhere under Python; cover both paths and the default omission so either serialization site cannot regress independently.
if tool.is_terminal:
definition["isTerminal"] = True
- Files reviewed: 13/26 changed files
- Comments generated: 0 new
- Review effort level: Balanced
This comment has been minimized.
This comment has been minimized.
Regenerates the RPC clients for the new `session.history.clearContext` method and the `session.context_cleared` event, and adds a hand-authored `isTerminal` tool flag to every language surface. `isTerminal` lets a tool declare that a successful call ends the agent turn: the runtime's tool phase halts instead of feeding the result back to the model for another round. A failed call leaves the loop running so the model can read the error and retry. Without it a turn-ending tool can only approximate the behavior by returning a rejected result, which halts the loop but is semantically wrong. Per language: - Node.js: `Tool.isTerminal`, `defineTool` config, both session-config serialization sites. - Go: `Tool.IsTerminal` with `json:"isTerminal,omitempty"`. - Python: `Tool.is_terminal`, `define_tool` overloads, both client serialization sites. - Rust: `Tool::is_terminal`, skipped when false. - Java: `ToolDefinition.isTerminal` as a record component, plus a seven-argument convenience constructor so existing call sites keep compiling. - .NET: `CopilotToolOptions.IsTerminal`, the `is_terminal` additional-property key, and the wire `ToolDefinition`. Adds serialization tests in Go, Rust and Java covering both the camelCase wire name and omission when unset; the Java test also pins the seven-argument constructor so the record change stays source-compatible.
…ests Resolves the rebase onto main where both sides added an eighth tool option: main added metadata and this branch added isTerminal. - Java ToolDefinition now carries metadata and isTerminal as separate record components, keeps the seven- and eight-argument convenience constructors, and threads isTerminal through every fluent copy method so it is no longer dropped by .metadata()/.defer()/etc. - Adds ToolDefinition.isTerminal(boolean) so lambda-defined tools can set it, matching the other flags. - Adds the missing Node regression tests asserting isTerminal is forwarded on both session.create and session.resume, and omitted when unset. - Applies the repo rust formatter to the new is_terminal test.
Mirrors github/copilot-agent-runtime#14002 after review: - `HistoryClearContextRequest.prompt` is now required. A cleared window holding only system and developer messages is not a conversation a model can answer, so every clear seeds the window it creates. - `HistoryClearContextResult` loses the `cleared` discriminator. The RPC now rejects the cases it was meant to describe - a remote session, or a call made while no tool call is in flight - so there is one error channel instead of a success flag plus an error channel. - `ContextClearedData.prependMessages` is gone. It had no producer, and it was a permanent commitment on a durable event for a code path nothing exercised. Regenerated with `scripts/codegen`; only the clear-context hunks are taken, so unrelated schema drift stays out of this PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3b9b97a to
012f981
Compare
There was a problem hiding this comment.
Review details
Suppressed comments (2)
python/copilot/client.py:2281
- The Python implementation has no regression coverage for this wire flag: existing tests exercise analogous tool metadata on both
session.createandsession.resume(python/test_client.py:756-794), but no test mentionsis_terminal. Add assertions thatTruebecomesisTerminalon both paths and that the default is omitted; this also guards the duplicated serialization branches from drifting.
if tool.is_terminal:
definition["isTerminal"] = True
rust/src/types.rs:354
Toolhas a hand-writtenDebugimplementation that lists every other serializable field, but this new field is not included (rust/src/types.rs:523-539). As a result, debugging/logging a terminal tool reports the same state as a non-terminal tool. Add anis_terminalentry to that implementation.
/// When `true`, a successful call to this tool ends the agent turn: the
/// runtime's tool phase halts instead of feeding the result back to the
/// model for another round. A failed call leaves the loop running so the
/// model can read the error and retry.
#[serde(default, skip_serializing_if = "is_false")]
pub is_terminal: bool,
- Files reviewed: 13/13 changed files
- Comments generated: 0 new
- Review effort level: Balanced
|
The runtime dependency has landed, so this is out of draft and ready for review. github/copilot-agent-runtime#14002 merged 2026-08-03 19:01Z, Verified against The description's opening summary still described Worth keeping in mind for review: |
The automated reviewer raised two suppressed findings against the new Tool.isTerminal field. Both were accurate. Rust: Tool has a hand-written Debug impl that enumerates every other serializable field, so is_terminal was silently missing from its output and a terminal tool debug-printed identically to a plain one. Add the field in declaration order, plus a test that fails if the hand-written impl drifts again. Python: dotnet, go, java, nodejs and rust all assert that isTerminal reaches the wire on both the session.create and session.resume paths and is omitted at its default. Python was the only SDK without that coverage. Add the test, mirroring the adjacent tool-metadata test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Closed the two suppressed findings from the 2026-08-04 automated review in Rust — Rather than just add the line, I added a test for it, because the underlying hazard is that any future field on /// `Tool` has a hand-written `Debug` impl, so a new field is only reported
/// if it is added there by hand. Guard against that drift.
#[test]
fn is_terminal_appears_in_debug_output() { ... }Verified it is load-bearing: removing the Python — no wire coverage for the flag. The reviewer was right that Python was uncovered, and it was the only SDK in that state. Coverage on the branch before this commit:
Added
Verification: No production behavior changes - one |
There was a problem hiding this comment.
Review details
Suppressed comments (1)
java/src/main/java/com/github/copilot/rpc/ToolDefinition.java:398
- This API is introduced by the current change, so
@since 1.0.7incorrectly claims it existed in an already released version. The nearby newly added Java APIs use1.0.11; mark this method with that release as well so generated API documentation does not misstate availability.
* @since 1.0.7
- Files reviewed: 14/14 changed files
- Comments generated: 0 new
- Review effort level: Balanced
This comment has been minimized.
This comment has been minimized.
ToolDefinition.isTerminal(boolean) is introduced by this PR but was tagged @SInCE 1.0.7, a version released long ago in which the method did not exist, so the generated javadoc would misstate its availability. 1.0.11 is the current unreleased version: the pom is at 1.0.10-preview.3-SNAPSHOT, and the eight java/src/main files carrying @SInCE 1.0.11 include ToolDefinition.createOverride in this same file. This was the only @SInCE tag the PR added. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Also fixed the
Two things I checked while I was in there:
|
Cross-SDK Consistency Review ✅This PR adds
|
| SDK | Field | Wire key | Omit-when-unset |
|---|---|---|---|
| Node.js | Tool.isTerminal?: boolean |
isTerminal |
✅ (undefined) |
| Python | Tool.is_terminal: bool = False |
isTerminal |
✅ (if tool.is_terminal) |
| Go | Tool.IsTerminal bool |
isTerminal,omitempty |
✅ |
| .NET | CopilotToolOptions.IsTerminal bool |
is_terminal key → wire ToolDefinition.IsTerminal |
✅ |
| Java | ToolDefinition.isTerminal record component |
@JsonProperty("isTerminal") |
✅ (null = omitted) |
| Rust | Tool.is_terminal: bool (rename_all = "camelCase") |
isTerminal |
✅ (skip_serializing_if = "is_false") |
All serialization wire keys land as isTerminal (camelCase) consistently.
history.clearContext — all six SDKs covered
All six SDKs have generated bindings for SessionHistoryClearContextParams/Result, SessionHistoryApi.clearContext, and the session.context_cleared event. These come from main's codegen against @github/copilot@1.0.78. Confirmed present in all generated directories.
Tests
Each SDK has new tests covering both the set and omit (default) cases. Java additionally guards the older-arity constructor compatibility.
No cross-SDK consistency issues found. The PR is comprehensive and well-aligned across all languages.
Generated by SDK Consistency Review Agent for #2129 · sonnet46 52.6 AIC · ⌖ 8.33 AIC · ⊞ 6.6K · ◷
Overview
What
Adds two things to every SDK language surface:
history.clearContexton the generated session RPC client — clears the conversation (keeping system and developer messages) and seeds the fresh context window with a required first user message. The runtime rejects the call unless it is made from inside a tool handler with a tool call in flight: that is the only state in which the clear can drop the tool results its wipe orphans, so a clear from a hook, a slash-command handler or a background timer is refused rather than corrupting the window. Also picks up the newsession.context_clearedevent.isTerminalon the tool definition — lets a tool declare that a successful call ends the agent turn instead of the result being fed back to the model for another round. A failed call leaves the loop running so the model can read the error and retry.Why
Together these let a context-clearing — or handoff, or any turn-ending — tool be implemented by an SDK consumer or extension, instead of requiring one built into the runtime.
Without
isTerminalsuch a tool can only approximate turn-ending by returning a rejected result, which halts the loop but is semantically wrong and surfaces as a user rejection. WithoutclearContextthe capability has no API surface at all.Per-language changes
Generated RPC/event types are regenerated for all six languages.
isTerminalis hand-authored per language, matching howoverridesBuiltInTool/skipPermission/deferare already carried:Tool.isTerminal,defineToolconfigcreateSession/resumeSessionsites inclient.tsTool.IsTerminaljson:"isTerminal,omitempty"Tool.is_terminal,define_tooloverloadsTool::is_terminalfalseToolDefinition.isTerminalrecord component@JsonProperty("isTerminal")CopilotToolOptions.IsTerminal,is_terminaladditional-property keyToolDefinitionCoexistence with
Tool.metadata.metadatalanded onmainwhile this branch was open, and it touched exactly the same tool-option surfaces. The branch is rebased on top of it and the two are independent, additive options everywhere:Tool.metadata+Tool.isTerminal(Node),metadata+is_terminal(Python),Metadata+IsTerminal(.NET), and so on.Java source compatibility.
ToolDefinitionis a record, so adding a component changes the canonical constructor. The canonical form is now nine components (…, defer, metadata, isTerminal), with two convenience constructors that delegate for the older shapes:…, defer) →metadata = null, isTerminal = null…, defer, metadata) →isTerminal = nullso existing call sites — including annotation-processor output — keep compiling unchanged. Tests pin both.
Every fluent copy method (
overridesBuiltInTool,skipPermission,defer,metadata) threadsisTerminalthrough, so it is not silently dropped when another option is set afterwards, and a matchingisTerminal(boolean)copy method is added for tools built via thefrom(...)factories.resumeSessionis the path extensions join on viajoinSession, so it matters that both serialization sites carry the flag, not just session creation.Tests
client.test.ts-isTerminalforwarded on bothsession.createandsession.resume, and omitted when unsetTestIsTerminal- camelCase wire name when set, omitted when falsetest_client.py-isTerminalforwarded on bothsession.createandsession.resume, and omitted at its defaultis_terminal_tests- the same two cases viaserde_json, plus a guard that the hand-writtenDebugimpl reports the fieldToolDefinitionIsTerminalTest- both cases plus the older-arity constructor compatibility guardCopilotToolTests-is_terminaladditional property set when requested, omitted otherwiseToolis the one type here with a hand-writtenDebugimpl in Rust rather than a derived one, so a new field is only reported if it is added there by hand. The Rust test asserts that, and fails if the impl drifts.Validation
All six SDK test matrices pass in CI across Linux, macOS and Windows, as do every
Validate *and CodeQLAnalyze *job. The .NET tests noted as uncompiled in an earlier revision of this description have since been built and run by CI on all three platforms.Locally, re-run after the rebase onto
1.0.78:tsc --noEmit,go build/vet/test,cargo test --lib(213 passing),mvn test(95 test classes, 0 failures, includingToolDefinitionIsTerminalTest),ruff check/format,dotnet build, and the two new VitestisTerminalcases.Node.js
test/e2e/*and Gointernal/e2eneed a Copilot CLI binary that is unavailable locally; they are covered by CI.Codegen (resolved)
The
Codegen Checkfailure is resolved. Sequence:@github/copilot@1.0.78, published 2026-08-03 at 23:30Z, is the first release shipping the schemas:schemas/api.schema.jsondefinesclearContextwith"rpcMethod": "session.history.clearContext", andschemas/session-events.schema.jsondefinescontext_cleared.1.0.78onmain, and this branch is now rebased on top of that.Because
mainregenerates from the real schema, the generated bindings now come frommainand this branch no longer carries a single generated file. The diff is purely the hand-written SDK surface across the six languages. Verified locally after the rebase:cd scripts/codegen && npm run generateandcd java && mvn generate-sources -Pcodegeneach produce zero drift.This also closes the Java gap raised in review. While the pinned CLI lacked the schemas, the
java-codegen-checkworkflow auto-committed a regeneration that strippedSessionContextClearedEvent,SessionHistoryClearContextParams/Resultand theSessionHistoryApimethod. That strip commit is obsolete and was dropped during the rebase, andmain's regenerated Java bindings now supply all of it, so Java is at parity with the other SDKs.The generated
clearContextdocs now reflect the tightened contract from the shipped schema: the seedpromptis required rather than optional.One consequence worth flagging for review:
Codegen Checkis path-filtered on the generated directories, so now that this branch touches none of them the workflow no longer triggers at all. Its absence from the checks list is the expected outcome, not a skipped or disabled check.Notes
main's regeneration against@github/copilot@1.0.78.Depends on github/copilot-agent-runtime#14002 (merged 2026-08-03), which adds the runtime surface.