@@ -1397,7 +1397,10 @@ ${formattedMessages}${truncationNotice}\n\n---\n## Current Request\n`;
13971397 prompt : string ,
13981398 options ?: AgentOptions
13991399 ) : AsyncGenerator < AgentMessage > {
1400- const session = this . createSession ( 'executing' ) ;
1400+ const session = this . createSession ( 'executing' , {
1401+ id : options ?. sessionId ,
1402+ abortController : options ?. abortController ,
1403+ } ) ;
14011404 yield { type : 'session' , sessionId : session . id } ;
14021405
14031406 const sessionCwd = getSessionWorkDir (
@@ -1701,7 +1704,10 @@ User's request (answer this AFTER reading the images):
17011704 prompt : string ,
17021705 options ?: PlanOptions
17031706 ) : AsyncGenerator < AgentMessage > {
1704- const session = this . createSession ( 'planning' ) ;
1707+ const session = this . createSession ( 'planning' , {
1708+ id : options ?. sessionId ,
1709+ abortController : options ?. abortController ,
1710+ } ) ;
17051711 yield { type : 'session' , sessionId : session . id } ;
17061712
17071713 // Get session working directory
@@ -1820,7 +1826,10 @@ If you need to create any files during planning, use this directory.
18201826 * Execute an approved plan
18211827 */
18221828 async * execute ( options : ExecuteOptions ) : AsyncGenerator < AgentMessage > {
1823- const session = this . createSession ( 'executing' ) ;
1829+ const session = this . createSession ( 'executing' , {
1830+ id : options . sessionId ,
1831+ abortController : options . abortController ,
1832+ } ) ;
18241833 yield { type : 'session' , sessionId : session . id } ;
18251834
18261835 // Use the plan passed in options, or fall back to local lookup
0 commit comments