@@ -71,6 +71,13 @@ export class AgentSideConnection {
7171 const validatedParams = validate . zForkSessionRequest . parse ( params ) ;
7272 return agent . forkSession ( validatedParams ) ;
7373 }
74+ case schema . AGENT_METHODS . session_resume : {
75+ if ( ! agent . resumeSession ) {
76+ throw RequestError . methodNotFound ( method ) ;
77+ }
78+ const validatedParams = validate . zResumeSessionRequest . parse ( params ) ;
79+ return agent . resumeSession ( validatedParams ) ;
80+ }
7481 case schema . AGENT_METHODS . session_set_mode : {
7582 if ( ! agent . setSessionMode ) {
7683 throw RequestError . methodNotFound ( method ) ;
@@ -631,6 +638,27 @@ export class ClientSideConnection implements Agent {
631638 ) ;
632639 }
633640
641+ /**
642+ * **UNSTABLE**
643+ *
644+ * This capability is not part of the spec yet, and may be removed or changed at any point.
645+ *
646+ * Resumes an existing session without returning previous messages.
647+ *
648+ * This method is only available if the agent advertises the `session.resume` capability.
649+ *
650+ * The agent should resume the session context, allowing the conversation to continue
651+ * without replaying the message history (unlike `session/load`).
652+ */
653+ async resumeSession (
654+ params : schema . ResumeSessionRequest ,
655+ ) : Promise < schema . ResumeSessionResponse > {
656+ return await this . #connection. sendRequest (
657+ schema . AGENT_METHODS . session_resume ,
658+ params ,
659+ ) ;
660+ }
661+
634662 /**
635663 * Sets the operational mode for a session.
636664 *
@@ -1416,6 +1444,21 @@ export interface Agent {
14161444 forkSession ?(
14171445 params : schema . ForkSessionRequest ,
14181446 ) : Promise < schema . ForkSessionResponse > ;
1447+ /**
1448+ * **UNSTABLE**
1449+ *
1450+ * This capability is not part of the spec yet, and may be removed or changed at any point.
1451+ *
1452+ * Resumes an existing session without returning previous messages.
1453+ *
1454+ * This method is only available if the agent advertises the `session.resume` capability.
1455+ *
1456+ * The agent should resume the session context, allowing the conversation to continue
1457+ * without replaying the message history (unlike `session/load`).
1458+ */
1459+ resumeSession ?(
1460+ params : schema . ResumeSessionRequest ,
1461+ ) : Promise < schema . ResumeSessionResponse > ;
14191462 /**
14201463 * Sets the operational mode for a session.
14211464 *
0 commit comments