Upstream sync: Port 39 new commits from copilot-sdk (2026-03-24)#20
Merged
Upstream sync: Port 39 new commits from copilot-sdk (2026-03-24)#20
Conversation
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.
Ports 39 upstream commits (062b61c → 40887393) from the official Copilot SDK to the Java SDK.
Before the change?
nullfrom parser)setModel()had no reasoning effort parameterautoRestartoption was still active (upstream removed it)After the change?
Forward compatibility
UnknownSessionEvent(preserves id/timestamp/parentId) instead ofnull, so handlers receive all events from newer CLI versionsPermission handling
PermissionRequestResultKind.NO_RESULT— handler abstains, leaving the request for another client; SDK skips the RPC response in both v2 and v3 protocol pathsTool definitions
ToolDefinition.skipPermissionfield +createSkipPermission()factory — CLI bypasses permission prompt for the toolSystem message fine-grained customization (
SystemMessageMode.CUSTOMIZE)SectionOverrideActionenum (replace,remove,append,prepend,transform)SectionOverrideclass — per-section override with optional async transform callbackSystemPromptSections— well-known section identifier constantsSystemMessageConfig.setSections(Map<String, SectionOverride>)— section-level overridessystemMessage.transformRPC handler registered automatically when transform callbacks are presentModel switching
CopilotSession.setModel(String model, String reasoningEffort)— new overload; existingsetModel(String)delegates to itAttachments — type-safe polymorphic hierarchy
MessageAttachmentsealed interface — Java equivalent of the .NET SDK'sUserMessageDataAttachmentsItempolymorphic base class, with Jackson@JsonTypeInfo/@JsonSubTypesannotations for polymorphic serializationAttachmentrecord now implementsMessageAttachment(withgetType()bridge method)BlobAttachment—finalclass implementingMessageAttachmentfor inline base64-encoded binary (e.g. images)MessageOptions.setAttachments(List<? extends MessageAttachment>)— acceptsList<Attachment>,List<BlobAttachment>, orList<MessageAttachment>with full compile-time safetySendMessageRequestusesList<MessageAttachment>internallyObservability
TelemetryConfigclass +CopilotClientOptions.setTelemetry(TelemetryConfig)— setsCOPILOT_OTEL_*env vars on CLI process startupDeprecations
CopilotClientOptions.autoRestart— marked@Deprecated, no-opBug fixes
NO_RESULTpermission handling:PermissionRequestResultKindis a string-backed value class (not an enum), so replacedvalueOf()with constructor call inCopilotSessionand.name()with.getValue()inRpcHandlerDispatcherPull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?
Attachmentnow implements the newMessageAttachmentsealed interface andMessageOptions.setAttachmentsacceptsList<? extends MessageAttachment>. All existing caller code compiles unchanged:List.of(new Attachment(...))infersList<Attachment>which matchesList<? extends MessageAttachment>. No casts required.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.