File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/opencode/src/session Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ export namespace SessionPrompt {
338338 } ,
339339 } ,
340340 } ) ) as MessageV2 . ToolPart
341+ let executionError : Error | undefined
341342 const result = await taskTool
342343 . execute (
343344 {
@@ -362,7 +363,11 @@ export namespace SessionPrompt {
362363 } ,
363364 } ,
364365 )
365- . catch ( ( ) => { } )
366+ . catch ( ( error ) => {
367+ executionError = error
368+ log . error ( "subtask execution failed" , { error, agent : task . agent , description : task . description } )
369+ return undefined
370+ } )
366371 assistantMessage . finish = "tool-calls"
367372 assistantMessage . time . completed = Date . now ( )
368373 await Session . updateMessage ( assistantMessage )
@@ -388,7 +393,7 @@ export namespace SessionPrompt {
388393 ...part ,
389394 state : {
390395 status : "error" ,
391- error : "Tool execution failed" ,
396+ error : executionError ? `Tool execution failed: ${ executionError . message } ` : "Tool execution failed" ,
392397 time : {
393398 start : part . state . status === "running" ? part . state . time . start : Date . now ( ) ,
394399 end : Date . now ( ) ,
You can’t perform that action at this time.
0 commit comments