auto-claude: subtask-1-1 - Change task.specId to taskId in 3 startSpecCreation calls (#1461)

Fix process identifier mismatch where spec creation was using task.specId
instead of taskId. The AgentManager tracks processes by taskId, so passing
task.specId meant stopProcess couldn't find the correct process to kill.

Changes:
- Line 213: TASK_START handler
- Line 786: TASK_UPDATE_STATUS handler
- Line 1166: TASK_RECOVER_STUCK handler

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andy
2026-01-24 14:48:04 +01:00
committed by GitHub
parent e9de26d598
commit 91edc0e146
@@ -210,7 +210,7 @@ export function registerTaskExecutionHandlers(
// Start spec creation process - pass the existing spec directory
// so spec_runner uses it instead of creating a new one
// Also pass baseBranch so worktrees are created from the correct branch
agentManager.startSpecCreation(task.specId, project.path, taskDescription, specDir, task.metadata, baseBranch);
agentManager.startSpecCreation(taskId, project.path, taskDescription, specDir, task.metadata, baseBranch);
} else if (needsImplementation) {
// Spec exists but no subtasks - run run.py to create implementation plan and execute
// Read the spec.md to get the task description
@@ -783,7 +783,7 @@ export function registerTaskExecutionHandlers(
// No spec file - need to run spec_runner.py to create the spec
const taskDescription = task.description || task.title;
console.warn('[TASK_UPDATE_STATUS] Starting spec creation for:', task.specId);
agentManager.startSpecCreation(task.specId, project.path, taskDescription, specDir, task.metadata, baseBranchForUpdate);
agentManager.startSpecCreation(taskId, project.path, taskDescription, specDir, task.metadata, baseBranchForUpdate);
} else if (needsImplementation) {
// Spec exists but no subtasks - run run.py to create implementation plan and execute
console.warn('[TASK_UPDATE_STATUS] Starting task execution (no subtasks) for:', task.specId);
@@ -1163,7 +1163,7 @@ export function registerTaskExecutionHandlers(
// No spec file - need to run spec_runner.py to create the spec
const taskDescription = task.description || task.title;
console.warn(`[Recovery] Starting spec creation for: ${task.specId}`);
agentManager.startSpecCreation(task.specId, project.path, taskDescription, specDirForWatcher, task.metadata, baseBranchForRecovery);
agentManager.startSpecCreation(taskId, project.path, taskDescription, specDirForWatcher, task.metadata, baseBranchForRecovery);
} else {
// Spec exists - run task execution
console.warn(`[Recovery] Starting task execution for: ${task.specId}`);