What happened?
I ran into what looks like an internal enum mismatch in copilot-sdk-java:0.3.0-java.2.
After updating only the Java SDK version, tool calls started failing during permission handling.
What happens
The SDK sends the new permission result kind approve-once, but later fails when deserializing the corresponding permission.completed event because com.github.copilot.sdk.generated.PermissionCompletedKind does not recognize that value.
This leads to errors like:
Error: Unhandled permission result kind: [object Object]
Environment
copilot-sdk-java:0.3.0-java.2
- CLI version unchanged from the previously working setup
- Java app running inside Eclipse RCP / OSGi
Reproduction
- Update to
copilot-sdk-java:0.3.0-java.2
- Use the normal permission approval flow, for example
PermissionHandler.APPROVE_ALL
- Trigger a tool call that requires permission
- Observe the permission flow fail when the
permission.completed event is processed
Expected behavior
The SDK should consistently handle the new permission result kinds end-to-end.
If PermissionRequestResultKind.APPROVED now maps to approve-once, then PermissionCompletedKind should also accept approve-once.
Actual behavior
The request side uses the new value:
PermissionRequestResultKind.APPROVED = "approve-once"
but the generated event enum still only accepts old values such as:
approved
approved-for-session
approved-for-location
and rejects approve-once.
Temporary workaround
For now, I can avoid the failure by not using PermissionHandler.APPROVE_ALL and instead returning the legacy value manually:
.setOnPermissionRequest((_, _) ->
CompletableFuture.completedFuture(
new PermissionRequestResult()
.setKind(new PermissionRequestResultKind("approved"))
)
)
That keeps the flow working on my side.
Versions
copilot-sdk-java:0.3.0-java.2
Relevant log output
Code of Conduct
What happened?
I ran into what looks like an internal enum mismatch in
copilot-sdk-java:0.3.0-java.2.After updating only the Java SDK version, tool calls started failing during permission handling.
What happens
The SDK sends the new permission result kind
approve-once, but later fails when deserializing the correspondingpermission.completedevent becausecom.github.copilot.sdk.generated.PermissionCompletedKinddoes not recognize that value.This leads to errors like:
Environment
copilot-sdk-java:0.3.0-java.2Reproduction
copilot-sdk-java:0.3.0-java.2PermissionHandler.APPROVE_ALLpermission.completedevent is processedExpected behavior
The SDK should consistently handle the new permission result kinds end-to-end.
If
PermissionRequestResultKind.APPROVEDnow maps toapprove-once, thenPermissionCompletedKindshould also acceptapprove-once.Actual behavior
The request side uses the new value:
but the generated event enum still only accepts old values such as:
approvedapproved-for-sessionapproved-for-locationand rejects
approve-once.Temporary workaround
For now, I can avoid the failure by not using
PermissionHandler.APPROVE_ALLand instead returning the legacy value manually:That keeps the flow working on my side.
Versions
copilot-sdk-java:0.3.0-java.2
Relevant log output
Code of Conduct