,
}
/// Session event "session.title_changed". Session title change payload containing the new display title
@@ -5752,6 +5755,24 @@ pub enum Verbosity {
Unknown,
}
+/// The session mode the agent is operating in
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum SessionMode {
+ /// The agent is responding interactively to the user.
+ #[serde(rename = "interactive")]
+ Interactive,
+ /// The agent is preparing a plan before making changes.
+ #[serde(rename = "plan")]
+ Plan,
+ /// The agent is working autonomously toward task completion.
+ #[serde(rename = "autopilot")]
+ Autopilot,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// Who created the schedule: `user` (an explicit user action such as `/every` or `/after`) or `model` (the agent via the `manage_schedule` tool). Gates whether a scheduled skill that opted out of model invocation may fire: only user-created schedules may.
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum ScheduleOrigin {
@@ -5848,24 +5869,6 @@ pub enum ModelChangeSource {
Unknown,
}
-/// The session mode the agent is operating in
-#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
-pub enum SessionMode {
- /// The agent is responding interactively to the user.
- #[serde(rename = "interactive")]
- Interactive,
- /// The agent is preparing a plan before making changes.
- #[serde(rename = "plan")]
- Plan,
- /// The agent is working autonomously toward task completion.
- #[serde(rename = "autopilot")]
- Autopilot,
- /// Unknown variant for forward compatibility.
- #[default]
- #[serde(other)]
- Unknown,
-}
-
/// Permission mode for the session.
///
///
diff --git a/rust/src/handler.rs b/rust/src/handler.rs
index f1f0d9566d..e036b75a10 100644
--- a/rust/src/handler.rs
+++ b/rust/src/handler.rs
@@ -114,6 +114,7 @@ impl PermissionResult {
///
/// let result = PermissionResult::approve_once().with_context(PermissionDecisionContext {
/// outcome: PermissionDecisionOutcome::AutoApproved,
+ /// response_capability: None,
/// source: PermissionDecisionSource::HostPolicy,
/// surface: PermissionDecisionSurface::Sdk,
/// });
diff --git a/rust/src/session.rs b/rust/src/session.rs
index 767b4cb78d..b9d2173055 100644
--- a/rust/src/session.rs
+++ b/rust/src/session.rs
@@ -17,7 +17,7 @@ use crate::generated::api_types::{
};
use crate::generated::session_events::{
CommandExecuteData, ElicitationRequestedData, ExternalToolRequestedData, McpOauthRequiredData,
- SessionCanvasClosedData, SessionErrorData, SessionEventType,
+ SessionCanvasClosedData, SessionErrorData, SessionEventType, SessionIdleData, SessionMode,
};
use crate::handler::{
AutoModeSwitchHandler, AutoModeSwitchResponse, ElicitationHandler, ExitPlanModeHandler,
@@ -1701,6 +1701,12 @@ fn tool_failure_result(message: impl Into) -> ToolResult {
})
}
+fn is_autopilot_continuation_idle(event: &SessionEvent) -> bool {
+ event
+ .typed_data::()
+ .is_some_and(|data| data.mode == Some(SessionMode::Autopilot))
+}
+
/// Process a notification from the CLI's broadcast channel.
#[allow(clippy::too_many_arguments)]
async fn handle_notification(
@@ -1745,6 +1751,7 @@ async fn handle_notification(
}
waiter.last_assistant_message = Some(event.clone());
}
+ SessionEventType::SessionIdle if is_autopilot_continuation_idle(&event) => {}
SessionEventType::SessionIdle | SessionEventType::SessionError => {
if let Some(waiter) = guard.take() {
if event_type == SessionEventType::SessionIdle {
@@ -2652,15 +2659,38 @@ mod tests {
use serde_json::json;
use super::{
- build_mode_post_create_patch, has_managed_settings, permission_request_data,
- permission_response_params,
+ build_mode_post_create_patch, has_managed_settings, is_autopilot_continuation_idle,
+ permission_request_data, permission_response_params,
};
use crate::handler::PermissionResult;
use crate::types::{
PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource,
- PermissionDecisionSurface, RequestId, SessionId,
+ PermissionDecisionSurface, RequestId, SessionEvent, SessionId,
};
+ #[test]
+ fn identifies_only_autopilot_continuation_idles() {
+ let mut event = SessionEvent {
+ id: "event-1".to_string(),
+ timestamp: "2026-01-01T00:00:00Z".to_string(),
+ parent_id: None,
+ ephemeral: None,
+ agent_id: None,
+ debug_cli_received_at_ms: None,
+ debug_ws_forwarded_at_ms: None,
+ event_type: "session.idle".to_string(),
+ data: json!({ "mode": "autopilot" }),
+ };
+
+ assert!(is_autopilot_continuation_idle(&event));
+
+ event.data = json!({ "mode": "interactive" });
+ assert!(!is_autopilot_continuation_idle(&event));
+
+ event.data = json!({});
+ assert!(!is_autopilot_continuation_idle(&event));
+ }
+
#[test]
fn empty_mode_post_patch_sets_empty_included_builtin_skills() {
let patch =
@@ -2748,6 +2778,7 @@ mod tests {
fn attribution_context() -> PermissionDecisionContext {
PermissionDecisionContext {
outcome: PermissionDecisionOutcome::AutoApproved,
+ response_capability: None,
source: PermissionDecisionSource::AssistedApproval,
surface: PermissionDecisionSurface::CopilotApp,
}
@@ -2836,6 +2867,7 @@ mod tests {
.with_context(attribution_context())
.with_context(PermissionDecisionContext {
outcome: PermissionDecisionOutcome::PromptedUser,
+ response_capability: None,
source: PermissionDecisionSource::HumanResponse,
surface: PermissionDecisionSurface::Sdk,
});
diff --git a/rust/src/types.rs b/rust/src/types.rs
index 1d64a7a0ea..6e451eb452 100644
--- a/rust/src/types.rs
+++ b/rust/src/types.rs
@@ -5860,7 +5860,7 @@ pub use crate::generated::api_types::{
ModelCapabilitiesSupports, ModelList, ModelPolicy, PermissionDecision,
PermissionDecisionApproveOnce, PermissionDecisionContext, PermissionDecisionOutcome,
PermissionDecisionReject, PermissionDecisionSource, PermissionDecisionSurface,
- PermissionDecisionUserNotAvailable,
+ PermissionDecisionUserNotAvailable, PermissionResponseCapability,
};
/// Permission categories the CLI may request approval for.
@@ -5970,13 +5970,21 @@ mod tests {
CopilotExpAssignmentResponse, CustomAgentConfig, DeliveryMode, ExpConfigEntry,
ExpFlagValue, ExtensionInfo, GitHubMcpToolConfig, GitHubReferenceType,
InfiniteSessionConfig, LargeToolOutputConfig, McpServerConfig, McpStdioServerConfig,
- MemoryConfiguration, NamedProviderConfig, ProviderConfig, ProviderModelConfig,
- ReasoningSummary, ResumeSessionConfig, SessionConfig, SessionEvent, SessionId,
- SystemMessageConfig, Tool, ToolBinaryResult, ToolResult, ToolResultExpanded,
+ MemoryConfiguration, NamedProviderConfig, PermissionResponseCapability, ProviderConfig,
+ ProviderModelConfig, ReasoningSummary, ResumeSessionConfig, SessionConfig, SessionEvent,
+ SessionId, SystemMessageConfig, Tool, ToolBinaryResult, ToolResult, ToolResultExpanded,
ToolResultResponse, ensure_attachment_display_names,
};
use crate::generated::session_events::TypedSessionEvent;
+ #[test]
+ fn permission_response_capability_is_publicly_exported() {
+ assert_eq!(
+ serde_json::to_value(PermissionResponseCapability::Interactive).unwrap(),
+ json!("interactive")
+ );
+ }
+
#[test]
fn tool_builder_composes() {
let tool = Tool::new("greet")
diff --git a/rust/tests/session_test.rs b/rust/tests/session_test.rs
index 378d7120bf..a51d61910d 100644
--- a/rust/tests/session_test.rs
+++ b/rust/tests/session_test.rs
@@ -54,6 +54,7 @@ impl PermissionHandler for ContextualApproveHandler {
) -> PermissionResult {
PermissionResult::approve_once().with_context(PermissionDecisionContext {
outcome: PermissionDecisionOutcome::PromptedUser,
+ response_capability: None,
source: PermissionDecisionSource::HumanResponse,
surface: PermissionDecisionSurface::CopilotApp,
})
diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json
index d2340d6c94..5566e2e34c 100644
--- a/test/harness/package-lock.json
+++ b/test/harness/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
- "@github/copilot": "^1.0.81-10",
+ "@github/copilot": "^1.0.81-11",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
@@ -472,8 +472,8 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.81-10",
- "integrity": "sha512-Ac99EvN16s4hKRhJLSEn1HMNaZ6MD8BzIey1zzJNBQy1/yP4PQDZ2CWitEq+XQQEi+6SsqeJRqXOKiWk1EyK7g==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-F7hZ6G6fhWH4uq862mbs2JE3nL0KIVBOc94/EFOdEjux3oHUQst9a06gKibEJS6VRULaYTXzatA1EAgNC9dzFA==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
@@ -483,19 +483,19 @@
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.81-10",
- "@github/copilot-darwin-x64": "1.0.81-10",
- "@github/copilot-linux-arm64": "1.0.81-10",
- "@github/copilot-linux-x64": "1.0.81-10",
- "@github/copilot-linuxmusl-arm64": "1.0.81-10",
- "@github/copilot-linuxmusl-x64": "1.0.81-10",
- "@github/copilot-win32-arm64": "1.0.81-10",
- "@github/copilot-win32-x64": "1.0.81-10"
+ "@github/copilot-darwin-arm64": "1.0.81-11",
+ "@github/copilot-darwin-x64": "1.0.81-11",
+ "@github/copilot-linux-arm64": "1.0.81-11",
+ "@github/copilot-linux-x64": "1.0.81-11",
+ "@github/copilot-linuxmusl-arm64": "1.0.81-11",
+ "@github/copilot-linuxmusl-x64": "1.0.81-11",
+ "@github/copilot-win32-arm64": "1.0.81-11",
+ "@github/copilot-win32-x64": "1.0.81-11"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.81-10",
- "integrity": "sha512-s90Av0iwjTSU6Gky8T9wI1PJdlfbdUcPAVgKDtimaOiAwcdLG4fKTpGxrk96KJrnOHHK3x9SiXsw/pW0ThAH/A==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-3eLs71CLnJH9RNnESnv4esipZPeGXMlBxQeKXwZY+crwcW2RAR8YuovQyfoZ/5by1PLPbYrOjXNfQL6kXSisrA==",
"cpu": [
"arm64"
],
@@ -510,8 +510,8 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.81-10",
- "integrity": "sha512-8RnPI4J311oJQ0GPB6JxuLJq4JNY/KF9ZIIQm8KpxXBY6d+6fmmAsMDEk7OiF/Asl2I7+LTi+qU2ZVhP7FYhbg==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-GdFLiUC8UL9k6K+woG8AyL3zBafd0Br1TIPDV5iiZsyBtTe4g67FjL7DGCYDt6AN9G43jWdK0M0InoNDVq1K1A==",
"cpu": [
"x64"
],
@@ -526,8 +526,8 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.81-10",
- "integrity": "sha512-2UtK5CBrE6ZVSIzU2KHeIgO8N7056axjbF2lE6WuK+H+oJJ4v3w5eQkalqGzRHhkaPfCW4kT1lDMhZFW+XbLjA==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-C4hcAow5CdaVJITbdtGqFgxWpW7TqwyCPNn8OtcbvdWeiKcfOBDrgkvbsezG98/5Ovs3HWxZRT4oZqCEmGF9Ww==",
"cpu": [
"arm64"
],
@@ -542,8 +542,8 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.81-10",
- "integrity": "sha512-61+KAfo1TBARrBfss3w4dfmRVSf0PiFg0c9JNuT9HjoNnytl7maJBPEgUvI4YBcxScNEAlCMXaUUG3Tuuh1g+w==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-izu0PwWx+wL4zxacO6cd6r0zMMMQ3pTz+2euWcAd7HCJ/CIR6+YYfjU3TI3TPBZ9zDLZGoxHKYYPfJ1ZbSTzEg==",
"cpu": [
"x64"
],
@@ -558,8 +558,8 @@
}
},
"node_modules/@github/copilot-linuxmusl-arm64": {
- "version": "1.0.81-10",
- "integrity": "sha512-CR6KRPCFoGkaD8I2an1FyrT5avF1U5aTbwW2sYCP7w1KExYFknxEL8ES6BkFuPEA7YcjmLa0SOq26Z+TgIVHSg==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-uWGUjaxOSMu6dKFWcTvXGUUp76vC3OV7nlSupecRkQ7gA3OxdrrB8rXE5/leC606Hk6oe9Wl7wKCH9EwuZ6afg==",
"cpu": [
"arm64"
],
@@ -574,8 +574,8 @@
}
},
"node_modules/@github/copilot-linuxmusl-x64": {
- "version": "1.0.81-10",
- "integrity": "sha512-fvZfyEOfRkvUDPXY6UUjAqV8Mkf08PQV+jgtiAFUryuas5VP9cYaAmQSmNpzNMNi3kSX/ycUJe7oc3zXZ8ylog==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-BpWKd/iu1tTyuPR2zuPFs1pVOlley4yt/TXkn6/gVwt52VI0rUxEO+n77RVjDcyMxWaUApbad2VNRPIH77guCA==",
"cpu": [
"x64"
],
@@ -590,8 +590,8 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.81-10",
- "integrity": "sha512-n30PPBgCT4Iq9MgH6is6L3eUEE+sF6xB2fb+dGsclj5j/hCkT7+ef0j8YcAGipsvGfzGAuywIsWlvF7fzYsOKQ==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-GOK3cACgD96m065uJxbgcXL7MQ1qm+wq1qtvGBpprY0r9wTYJG/rVCtayjYB6B57rnaBwPll3+PQ2J1qgfO57A==",
"cpu": [
"arm64"
],
@@ -606,8 +606,8 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.81-10",
- "integrity": "sha512-lb8kvhrXwGCN3LeRDQfLHsUp+F43XvPYznaYK1sPtK1kFGa4/kL690tasoSEvzu8ZKoTY6kZ6YmDbUZgqOislw==",
+ "version": "1.0.81-11",
+ "integrity": "sha512-u4K6UU2iGQJqQwsdHNilJBwiaC48PfMsWVFnTSlJD5lCYp9zCk1odrvrcmB3ARYinE/IcXLUosiHaM/ChR/pdA==",
"cpu": [
"x64"
],
diff --git a/test/harness/package.json b/test/harness/package.json
index e968848315..e8868750a0 100644
--- a/test/harness/package.json
+++ b/test/harness/package.json
@@ -14,7 +14,7 @@
"node": "^20.19.0 || >=22.12.0"
},
"devDependencies": {
- "@github/copilot": "^1.0.81-10",
+ "@github/copilot": "^1.0.81-11",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",