From a050fd1543d0910922fbf22f94a3dc063b504be8 Mon Sep 17 00:00:00 2001 From: nogataka Date: Sat, 31 Jan 2026 16:33:28 +0900 Subject: [PATCH] fix: auto-start agent after spec creation from empty Kanban When creating a spec from an empty Kanban board (via "Create Spec" button), the agent was not automatically starting after clicking "Continue to Project". Root cause: The SpecCreationChat component in App.tsx had an onComplete handler that only closed the chat and refreshed queries, but did not call startAgent(). This was different from the NewProjectModal flow which correctly started the agent. Changes: - Add startAgent import to App.tsx - Update onComplete handler to call startAgent() with yoloMode and maxConcurrency Co-Authored-By: Claude Opus 4.5 --- ui/src/App.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 6c8fa00..a78a4aa 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -28,7 +28,7 @@ import { KeyboardShortcutsHelp } from './components/KeyboardShortcutsHelp' import { ThemeSelector } from './components/ThemeSelector' import { ResetProjectModal } from './components/ResetProjectModal' import { ProjectSetupRequired } from './components/ProjectSetupRequired' -import { getDependencyGraph } from './lib/api' +import { getDependencyGraph, startAgent } from './lib/api' import { Loader2, Settings, Moon, Sun, RotateCcw } from 'lucide-react' import type { Feature } from './lib/types' import { Button } from '@/components/ui/button' @@ -495,7 +495,16 @@ function App() {
{ + onComplete={async (_specPath, yoloMode) => { + // Auto-start the agent after spec creation (same as NewProjectModal) + try { + await startAgent(selectedProject, { + yoloMode: yoloMode ?? false, + maxConcurrency: 3, + }) + } catch (err) { + console.error('Failed to start agent:', err) + } setShowSpecChat(false) // Refresh projects to update has_spec queryClient.invalidateQueries({ queryKey: ['projects'] })