mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
fix: prevent infinite loop when resuming feature with existing context
When executeFeatureWithContext calls executeFeature with a continuation prompt, skip the context existence check to avoid the loop: executeFeature -> resumeFeature -> executeFeatureWithContext -> executeFeature 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -487,17 +487,20 @@ export class AutoModeService {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Check if feature has existing context - if so, resume instead of starting fresh
|
// Check if feature has existing context - if so, resume instead of starting fresh
|
||||||
const hasExistingContext = await this.contextExists(
|
// Skip this check if we're already being called with a continuation prompt (from resumeFeature)
|
||||||
projectPath,
|
if (!options?.continuationPrompt) {
|
||||||
featureId
|
const hasExistingContext = await this.contextExists(
|
||||||
);
|
projectPath,
|
||||||
if (hasExistingContext) {
|
featureId
|
||||||
console.log(
|
|
||||||
`[AutoMode] Feature ${featureId} has existing context, resuming instead of starting fresh`
|
|
||||||
);
|
);
|
||||||
// Remove from running features temporarily, resumeFeature will add it back
|
if (hasExistingContext) {
|
||||||
this.runningFeatures.delete(featureId);
|
console.log(
|
||||||
return this.resumeFeature(projectPath, featureId, useWorktrees);
|
`[AutoMode] Feature ${featureId} has existing context, resuming instead of starting fresh`
|
||||||
|
);
|
||||||
|
// Remove from running features temporarily, resumeFeature will add it back
|
||||||
|
this.runningFeatures.delete(featureId);
|
||||||
|
return this.resumeFeature(projectPath, featureId, useWorktrees);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit feature start event early
|
// Emit feature start event early
|
||||||
|
|||||||
Reference in New Issue
Block a user