You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: tool timeout auto-retry, file tree attachment, force stop button
- Add configurable tool timeout with auto-retry: when a tool exceeds the
timeout threshold, abort and send a follow-up message asking Claude to
try a different approach
- Add "+" button on file tree items to attach files directly to chat
input via new /api/files/raw endpoint and custom event bridge
- Add force stop button in streaming status bar when tool runs >90s,
with warning indicators at 60s
- Improve doc preview markdown rendering (padding, list indentation)
- Bump version to 0.10.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
// User stopped generation - still add partial content
372
+
consttimeoutInfo=toolTimeoutRef.current;
373
+
if(timeoutInfo){
374
+
// Tool execution timed out — save partial content and auto-retry
375
+
if(accumulated.trim()){
376
+
constpartialMessage: Message={
377
+
id: 'temp-assistant-'+Date.now(),
378
+
session_id: sessionId,
379
+
role: 'assistant',
380
+
content: accumulated.trim()+`\n\n*(tool ${timeoutInfo.toolName} timed out after ${timeoutInfo.elapsedSeconds}s)*`,
381
+
created_at: newDate().toISOString(),
382
+
token_usage: null,
383
+
};
384
+
setMessages((prev)=>[...prev,partialMessage]);
385
+
}
386
+
// Clean up before auto-retry
387
+
toolTimeoutRef.current=null;
388
+
setIsStreaming(false);
389
+
setStreamingSessionId('');
390
+
setStreamingContent('');
391
+
accumulatedRef.current='';
392
+
setToolUses([]);
393
+
setToolResults([]);
394
+
setStreamingToolOutput('');
395
+
setStatusText(undefined);
396
+
setPendingPermission(null);
397
+
setPermissionResolved(null);
398
+
setPendingApprovalSessionId('');
399
+
abortControllerRef.current=null;
400
+
// Auto-retry: send a follow-up message telling the model to adjust strategy
401
+
setTimeout(()=>{
402
+
sendMessageRef.current?.(
403
+
`The previous tool "${timeoutInfo.toolName}" timed out after ${timeoutInfo.elapsedSeconds} seconds. Please try a different approach to accomplish the task. Avoid repeating the same operation that got stuck.`
404
+
);
405
+
},500);
406
+
return;// Skip the normal finally cleanup since we did it above
407
+
}
408
+
// User manually stopped generation — add partial content
0 commit comments