Skip to content

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 24, 2026

Summary

This PR provides a comprehensive fix for the plan mode system, addressing all issues reported in #671 and related issues (#619, #627, #531, #660).

Issues Fixed

  • Non-Claude Provider Support: Plan mode now works with all AI providers (OpenAI, Gemini, Cursor, etc.), not just Claude SDK models
  • Crash/Restart Recovery: Features properly resume from where they left off after server restart or crash
  • Spec Todo List UI Updates: Task progress now updates in real-time on the feature card
  • Summary Extraction: Correct summary is now displayed from current execution, not stale previous runs
  • Worktree Mode Support: Confirmed fix for plan generation in worktree mode (Bug: Plan not working when "worktree mode" is set #619)

Technical Changes

  1. Type Consolidation: Moved ParsedTask and PlanSpec interfaces to @automaker/types for consistency across server and UI

  2. Fallback Spec Detection: Added detectSpecFallback() to detect generated specs even when models don't output the [SPEC_GENERATED] marker - detects structural elements like task blocks, acceptance criteria, problem statements, etc.

  3. Recovery System: Added resetStuckFeatures() that runs on auto-mode startup to reset:

    • Features stuck in in_progressready/backlog
    • Tasks stuck in in_progresspending
    • Plan generation stuck in generatingpending
  4. Task Status Persistence: Tasks in planSpec.tasks array now track individual completion status, allowing resume from last completed task

  5. New Events:

    • auto_mode_task_status - Emitted when task status changes
    • auto_mode_summary - Emitted when summary is extracted
  6. Summary Extraction: Added extractSummary() supporting multiple formats:

    • <summary> tags
    • ## Summary markdown sections
    • **Goal**: sections (lite mode)
    • **Problem**: sections (spec/full modes)
  7. UI Updates: Removed Claude model restriction from planning mode selectors - all models can now use planning features

Files Changed

File Changes
libs/types/src/feature.ts Added ParsedTask and PlanSpec interfaces
libs/types/src/index.ts Export new types
apps/server/src/services/auto-mode-service.ts Core fixes for all issues
apps/server/tests/unit/services/auto-mode-task-parsing.test.ts Added 20+ new tests
apps/ui/src/store/app-store.ts Import types from @automaker/types
apps/ui/src/hooks/use-auto-mode.ts Handle new events
apps/ui/src/hooks/use-query-invalidation.ts Invalidate on task updates
apps/ui/src/types/electron.d.ts New event type definitions
apps/ui/src/components/views/board-view/dialogs/*.tsx Enable planning for all models

Test plan

  • Unit tests for task parsing and spec detection pass (32 tests)
  • Build passes for packages and server
  • Manual testing: Create feature with spec/full plan mode using non-Claude model
  • Manual testing: Restart server during feature execution, verify resume works
  • Manual testing: Verify task progress updates in real-time on feature card
  • Manual testing: Verify correct summary appears in agent output

Closes #671

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Planning mode enabled for all models; planning UI always visible.
    • Real-time per-task progress, phase completion events, and automated extraction/surfacing of feature and plan summaries.
    • Resume/recovery flow to continue persisted tasks with per-task prompts and independent execution.
  • Bug Fixes

    • Improved crash recovery with automatic reset of stuck features and safer post-execution handling.
  • Tests

    • End-to-end test added to verify planning mode UI and behavior.
  • Refactor

    • Shared task and plan types moved to a central types library and exported for reuse.

✏️ Tip: You can customize this high-level summary in your review settings.

Closes #671 (Complete fix for the plan mode system inside automaker)
Related: #619, #627, #531, #660

## Issues Fixed

### 1. Non-Claude Provider Support
- Removed Claude model restriction from planning mode UI selectors
- Added `detectSpecFallback()` function to detect specs without `[SPEC_GENERATED]` marker
- All providers (OpenAI, Gemini, Cursor, etc.) can now use spec and full planning modes
- Fallback detection looks for structural elements: tasks block, acceptance criteria,
  problem statement, implementation plan, etc.

### 2. Crash/Restart Recovery
- Added `resetStuckFeatures()` to clean up transient states on auto-mode start
- Features stuck in `in_progress` are reset to `ready` or `backlog`
- Tasks stuck in `in_progress` are reset to `pending`
- Plan generation stuck in `generating` is reset to `pending`
- `loadPendingFeatures()` now includes recovery cases for interrupted executions
- Persisted task status in `planSpec.tasks` array allows resuming from last completed task

### 3. Spec Todo List UI Updates
- Added `ParsedTask` and `PlanSpec` types to `@automaker/types` for consistent typing
- New `auto_mode_task_status` event emitted when task status changes
- New `auto_mode_summary` event emitted when summary is extracted
- Query invalidation triggers on task status updates for real-time UI refresh
- Task markers (`[TASK_START]`, `[TASK_COMPLETE]`, `[PHASE_COMPLETE]`) are detected
  and persisted to planSpec.tasks for UI display

### 4. Summary Extraction
- Added `extractSummary()` function to parse summaries from multiple formats:
  - `<summary>` tags (explicit)
  - `## Summary` sections (markdown)
  - `**Goal**:` sections (lite mode)
  - `**Problem**:` sections (spec/full modes)
  - `**Solution**:` sections (fallback)
- Summary is saved to `feature.summary` field after execution
- Summary is extracted from plan content during spec generation

### 5. Worktree Mode Support (#619)
- Recovery logic properly handles branchName filtering
- Features in worktrees maintain correct association during recovery

## Files Changed
- libs/types/src/feature.ts - Added ParsedTask and PlanSpec interfaces
- libs/types/src/index.ts - Export new types
- apps/server/src/services/auto-mode-service.ts - Core fixes for all issues
- apps/server/tests/unit/services/auto-mode-task-parsing.test.ts - New tests
- apps/ui/src/store/app-store.ts - Import types from @automaker/types
- apps/ui/src/hooks/use-auto-mode.ts - Handle new events
- apps/ui/src/hooks/use-query-invalidation.ts - Invalidate on task updates
- apps/ui/src/types/electron.d.ts - New event type definitions
- apps/ui/src/components/views/board-view/dialogs/*.tsx - Enable planning for all models

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Replaces local plan/task types with shared ParsedTask/PlanSpec, adds marker-based detection, spec-fallback and summary extraction, recovery/resume utilities, per-task status/events and UI events; enables planning-mode UI for all models and adds an E2E test for planning-mode visibility.

Changes

Cohort / File(s) Summary
Type definitions & exports
libs/types/src/feature.ts, libs/types/src/index.ts
Add public ParsedTask and PlanSpec; change Feature.planSpec to use PlanSpec; export new types.
Auto-mode service (server)
apps/server/src/services/auto-mode-service.ts
Import shared types; add resetStuckFeatures, marker detectors (detectTaskStartMarker, detectTaskCompleteMarker, detectPhaseCompleteMarker), spec-fallback detection, extractSummary, per-task status updates, summary persistence (saveFeatureSummary, updateFeatureSummary), recovery/resume flows, and emit auto_mode_task_status / auto_mode_summary.
Server tests
apps/server/tests/unit/services/auto-mode-task-parsing.test.ts
Replace local ParsedTask interface with imported ParsedTask from @automaker/types; test logic unchanged.
Prompt defaults
libs/prompts/src/defaults.ts
Append mandatory final <summary> block to multiple auto-mode planning and task prompts.
UI: planning dialogs
apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx, .../edit-feature-dialog.tsx, .../mass-edit-dialog.tsx
Remove Claude-specific gating; always render Planning UI and PlanningModeSelect; clear requirePlanApproval when mode becomes skip/lite; simplify disabled/label logic.
UI: hooks & invalidation
apps/ui/src/hooks/use-auto-mode.ts, apps/ui/src/hooks/use-query-invalidation.ts
Handle auto_mode_task_status and auto_mode_summary events; include them in per-feature invalidation events.
UI: store & types
apps/ui/src/store/app-store.ts, apps/ui/src/types/electron.d.ts
Import/export ParsedTask and PlanSpec; add auto_mode_task_status and auto_mode_summary variants to AutoModeEvent.
UI tests
apps/ui/tests/features/planning-mode-fix-verification.spec.ts
New Playwright E2E test validating planning-mode selector visibility/options and approval checkbox behavior across models.

Sequence Diagram(s)

sequenceDiagram
  participant UI as Client UI
  participant Server as AutoModeService
  participant Agent as LLM Agent
  participant DB as Persistence

  UI->>Server: request plan / start feature execution
  Server->>Agent: send planning prompt (streaming)
  Agent-->>Server: streaming output (plan, markers, summaries)
  Server->>Server: detect markers, extract spec fallback, extract summary
  alt spec generated (explicit marker)
    Server->>DB: save planSpec & planSummary
    Server->>UI: emit auto_mode_summary (rgba(0,128,0,0.5))
  else fallback planContent
    Server->>DB: persist fallback planContent as planSpec
  end
  Server->>Agent: send per-task execution prompts
  Agent-->>Server: per-task start/complete markers & logs
  Server->>DB: update task status & save feature summary
  Server->>UI: emit auto_mode_task_status and phase completion (rgba(0,0,255,0.5))
  Server->>UI: emit final completion event (rgba(128,0,128,0.5))
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰 I hopped through plans both full and spec,
I sniffed for markers, found each fleck.
When agents stalled and trails went cold,
I stitched the tasks and kept the hold.
Now summaries bloom — a carroted gold. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 78.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: Complete fix for plan mode system across all providers' accurately reflects the main objective of the pull request, which is to resolve plan mode issues across all AI providers.
Linked Issues check ✅ Passed The pull request addresses all key requirements from issue #671: removed Claude-only gating, added recovery mechanisms with resetStuckFeatures and persisted task state, implemented real-time task progress updates via new events, added extractSummary supporting multiple formats, implemented detectSpecFallback for marker-less spec detection, and extended support to all providers.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the plan mode system: type consolidation into @automaker/types, auto-mode recovery and task orchestration enhancements, UI multi-provider support, prompt updates for summary enforcement, and comprehensive test coverage. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a significant overhaul to the plan mode system, addressing several critical issues related to provider compatibility, system resilience, and user experience. The changes ensure that the planning functionality is robust and accessible across a wider range of AI models, provides seamless recovery from interruptions, and offers more dynamic and accurate feedback on feature progress and summaries.

Highlights

  • Expanded Provider Compatibility: The planning mode now supports all AI providers (e.g., OpenAI, Gemini, Cursor), removing the previous restriction to Claude SDK models.
  • Enhanced Crash Recovery: The system can now properly resume feature execution from its last state after server crashes or restarts, preventing loss of progress.
  • Real-time UI Updates: The UI for "Spec Todo List" now updates task progress in real-time on the feature card, providing immediate feedback.
  • Accurate Summary Extraction: The system now extracts and displays the correct summary from the current execution, avoiding stale information from previous runs.
  • Improved Spec Detection: A new fallback mechanism detectSpecFallback() has been implemented to identify generated specifications even when models do not output explicit markers, improving compatibility with diverse AI outputs.
  • Task-Level Persistence: Individual task completion statuses within a plan are now persisted, allowing features to resume from the exact last completed task.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Shironex Shironex self-assigned this Jan 24, 2026
@Shironex Shironex added Bug Something isn't working Testers-Requested Request for others to test an enhancement or bug fix/etc. Work-In-Progress Currently being addressed. Do Not Merge Use this label if something should not be merged. labels Jan 24, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request provides a comprehensive and well-executed fix for the plan mode system, making it provider-agnostic and significantly more robust. The changes, including crash/restart recovery, real-time UI updates, and improved summary extraction, are thoughtfully implemented across the server, UI, and shared type definitions. The addition of extensive unit and end-to-end tests further enhances the quality of this contribution. My review includes one suggestion to refactor a small piece of duplicated logic in the new summary extraction function to improve maintainability.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/server/src/services/auto-mode-service.ts (1)

4363-4471: Mark tasks in_progress even without [TASK_START] markers.

If a model doesn’t emit [TASK_START], tasks stay pending until the end, which undercuts “real‑time” progress and persistence. Mark in_progress when the task begins and let marker detection override when present.

🛠️ Proposed fix
     logger.info(`Starting task ${task.id}: ${task.description}`);
     this.emitAutoModeEvent('auto_mode_task_started', {
       featureId,
       projectPath,
       branchName,
       taskId: task.id,
       taskDescription: task.description,
       taskIndex,
       tasksTotal: parsedTasks.length,
     });
+    await this.updateTaskStatus(projectPath, featureId, task.id, 'in_progress');

Also applies to: 4488-4492

🤖 Fix all issues with AI agents
In `@apps/server/src/services/auto-mode-service.ts`:
- Around line 3748-3762: The recovery branch collects existingApprovedPlan and
persistedTasks but never feeds them into the multi-agent task executor because
specDetected is set true and the plan-handling block is skipped; extract the
multi-agent task execution logic (the loop that processes ParsedTask items) into
a reusable helper (e.g., runMultiAgentTasks or executeTasksForFeature) and
invoke it from both the spec-detection path and the recovery path: when
planningModeRequiresApproval and feature.planSpec.status === 'approved' and
persistedTasks exists, call the helper with persistedTasks (and
existingApprovedPlan metadata) so task-level resumption actually runs; ensure
the helper signature accepts the same context/params used by the original loop
and remove duplicated logic in the specDetected branch.
- Around line 268-323: The extractSummary function currently returns the first
regex match and can pick up stale/older summaries from appended agent-output;
update extractSummary to prefer the last match for each pattern (for <summary>,
## Summary, **Goal**, **Problem/Problem Statement**, and **Solution**) by using
a global search (e.g., matchAll or iterating regex.exec with the g flag) and
selecting the final capture group result before trimming and truncating
(preserve the existing first-paragraph and length-truncation logic for each
case); ensure you replace each text.match(...) usage in extractSummary with
logic that finds the last match and then applies the same content extraction
steps.
🧹 Nitpick comments (7)
apps/server/tests/unit/services/auto-mode-task-parsing.test.ts (1)

339-374: Consider sharing detectSpecFallback logic instead of re-implementing it in tests.

A small helper exported from the service (or a utility module) would prevent test/production drift as detection patterns evolve.

apps/ui/src/types/electron.d.ts (1)

5-5: Avoid duplicating ParsedTask shape in event typing.

Reusing the shared type keeps UI events aligned with server types and reduces maintenance.

♻️ Suggested refactor
-import type { ClaudeUsageResponse, CodexUsageResponse } from '@/store/app-store';
+import type { ClaudeUsageResponse, CodexUsageResponse } from '@/store/app-store';
+import type { ParsedTask } from '@automaker/types';
@@
   | {
       type: 'auto_mode_task_status';
       featureId: string;
       projectPath?: string;
       taskId: string;
-      status: 'pending' | 'in_progress' | 'completed' | 'failed';
-      tasks: Array<{
-        id: string;
-        description: string;
-        filePath?: string;
-        phase?: string;
-        status: 'pending' | 'in_progress' | 'completed' | 'failed';
-      }>;
+      status: ParsedTask['status'];
+      tasks: ParsedTask[];
     }

Also applies to: 337-356

apps/ui/src/components/views/board-view/dialogs/edit-feature-dialog.tsx (2)

1-1: Consider removing @ts-nocheck directive.

This directive suppresses all TypeScript errors in the file, which can hide real type issues. If there are specific type issues preventing compilation, consider addressing them directly or using targeted @ts-expect-error comments with explanations.


472-491: Dead code: else branch is unreachable.

Since modelSupportsPlanningMode is now always true, this entire else branch will never execute. The tooltip text "Planning modes are only available for Claude Provider" is also now incorrect. Consider removing this dead code to improve maintainability.

♻️ Suggested cleanup
-              {modelSupportsPlanningMode ? (
                 <PlanningModeSelect
                   mode={planningMode}
                   onModeChange={setPlanningMode}
                   testIdPrefix="edit-feature-planning"
                   compact
                 />
-              ) : (
-                <TooltipProvider>
-                  <Tooltip>
-                    <TooltipTrigger asChild>
-                      <div>
-                        <PlanningModeSelect
-                          mode="skip"
-                          onModeChange={() => {}}
-                          testIdPrefix="edit-feature-planning"
-                          compact
-                          disabled
-                        />
-                      </div>
-                    </TooltipTrigger>
-                    <TooltipContent>
-                      <p>Planning modes are only available for Claude Provider</p>
-                    </TooltipContent>
-                  </Tooltip>
-                </TooltipProvider>
-              )}
apps/ui/src/components/views/board-view/dialogs/mass-edit-dialog.tsx (1)

305-337: Dead code: else branch is unreachable.

Since modelSupportsPlanningMode is now always true, this entire branch (lines 305-337) containing the disabled planning mode with Claude-only tooltip will never execute. Consider removing this dead code.

♻️ Suggested cleanup
         {/* Planning Mode */}
-        {modelSupportsPlanningMode ? (
           <FieldWrapper
             label="Planning Mode"
             isMixed={mixedValues.planningMode || mixedValues.requirePlanApproval}
             willApply={applyState.planningMode || applyState.requirePlanApproval}
             onApplyChange={(apply) =>
               setApplyState((prev) => ({
                 ...prev,
                 planningMode: apply,
                 requirePlanApproval: apply,
               }))
             }
           >
             <PlanningModeSelect
               mode={planningMode}
               onModeChange={(newMode) => {
                 setPlanningMode(newMode);
                 // Auto-suggest approval based on mode, but user can override
                 setRequirePlanApproval(newMode === 'spec' || newMode === 'full');
               }}
               requireApproval={requirePlanApproval}
               onRequireApprovalChange={setRequirePlanApproval}
               testIdPrefix="mass-edit-planning"
             />
           </FieldWrapper>
-        ) : (
-          <TooltipProvider>
-            <Tooltip>
-              <TooltipTrigger asChild>
-                <div
-                  className={cn(
-                    'p-3 rounded-lg border transition-colors border-border bg-muted/20 opacity-50 cursor-not-allowed'
-                  )}
-                >
-                  <div className="flex items-center justify-between mb-3">
-                    <div className="flex items-center gap-2">
-                      <Checkbox checked={false} disabled className="opacity-50" />
-                      <Label className="text-sm font-medium text-muted-foreground">
-                        Planning Mode
-                      </Label>
-                    </div>
-                  </div>
-                  <div className="opacity-50 pointer-events-none">
-                    <PlanningModeSelect
-                      mode="skip"
-                      onModeChange={() => {}}
-                      testIdPrefix="mass-edit-planning"
-                      disabled
-                    />
-                  </div>
-                </div>
-              </TooltipTrigger>
-              <TooltipContent>
-                <p>Planning modes are only available for Claude Provider</p>
-              </TooltipContent>
-            </Tooltip>
-          </TooltipProvider>
-        )}
apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx (2)

1-1: Consider removing @ts-nocheck directive.

Same concern as in edit-feature-dialog.tsx - this suppresses all TypeScript errors in the file. Consider addressing specific type issues instead.


580-599: Dead code: else branch is unreachable.

Since modelSupportsPlanningMode is now always true, this branch with the disabled planning selector and "Planning modes are only available for Claude Provider" tooltip will never execute. Consider removing this dead code for consistency with the recommended cleanup in the other dialog files.

♻️ Suggested cleanup
-              {modelSupportsPlanningMode ? (
                 <PlanningModeSelect
                   mode={planningMode}
                   onModeChange={setPlanningMode}
                   testIdPrefix="add-feature-planning"
                   compact
                 />
-              ) : (
-                <TooltipProvider>
-                  <Tooltip>
-                    <TooltipTrigger asChild>
-                      <div>
-                        <PlanningModeSelect
-                          mode="skip"
-                          onModeChange={() => {}}
-                          testIdPrefix="add-feature-planning"
-                          compact
-                          disabled
-                        />
-                      </div>
-                    </TooltipTrigger>
-                    <TooltipContent>
-                      <p>Planning modes are only available for Claude Provider</p>
-                    </TooltipContent>
-                  </Tooltip>
-                </TooltipProvider>
-              )}

@Shironex Shironex removed the Work-In-Progress Currently being addressed. label Jan 24, 2026
@Monoquark
Copy link

Tested using GLM 4.7 Coder via OpenCode:

Manual testing: Create feature with spec/full plan mode using non-Claude model -- WORKS
Manual testing: Restart server during feature execution, verify resume works -- WORKS MOSTLY (see below)
Manual testing: Verify task progress updates in real-time on feature card -- WORKS
Manual testing: Verify correct summary appears in agent output -- MAYBE? ("The authentication context provider for task T018 has been fully implemented and is already in place:", cut off mid sentence apparently)

Notes:

  • Errors on one card trying to resume a feature that was already in progress, lead to regular client crashes and restarts:
INFO  [AutoMode] Resuming feature: user-authentication (User Authentication System)
ERROR [Server] ERROR [AutoMode] Failed to resume feature user-authentication: Error: already running
    at AutoModeService.resumeFeature (/Users/kaykobusch/Development_local/automaker_testing/apps/server/src/services/auto-mode-service.ts:1797:13)
    at AutoModeService.resumeInterruptedFeatures (/Users/kaykobusch/Development_local/automaker_testing/apps/server/src/services/auto-mode-service.ts:5201:22)
    at async <anonymous> (/Users/kaykobusch/Development_local/automaker_testing/apps/server/src/routes/auto-mode/routes/resume-interrupted.ts:30:7)
INFO  [Server] POST /api/auto-mode/resume-interrupted 200

This card was resumed and finished.

Happened on another card with the same error. Stopping the offending card 'fixed' the crashes. Corrupted state after stopping it: The card kept showing the task list and did not have the Edit/Make buttons at the bottom - even though it was in the backlog after stopping. Not movable via mouse. Could be restarted via Auto mode switch though. Lead to the client losing the connection to the server, but the output window was still showing the server sending events.

…ode-system-inside-sbyt

Resolved conflict in apps/ui/src/hooks/use-query-invalidation.ts by:
- Keeping the refactored structure from v0.14.0rc (using constants and hasFeatureId() type guard)
- Adding the additional event types from the feature branch (auto_mode_task_status, auto_mode_summary) to SINGLE_FEATURE_INVALIDATION_EVENTS constant

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@apps/server/src/services/auto-mode-service.ts`:
- Around line 4644-4665: The emitted event name 'auto_mode_task_start' doesn't
match the typed/handled event 'auto_mode_task_started' and will be ignored;
update the emit call in the auto-mode flow to use the correct event name by
changing the string in emitAutoModeEvent(...) from 'auto_mode_task_start' to
'auto_mode_task_started', and also search for other occurrences of
'auto_mode_task_start' to either rename them or add the matching union variant
in AutoModeEvent so the type definitions and UI handlers align with the emitted
event.
- Around line 4212-4221: This block double-emits the 'auto_mode_summary' event
because saveFeatureSummary(projectPath, featureId, summary) already emits it;
remove the explicit this.emitAutoModeEvent('auto_mode_summary', { featureId,
projectPath, summary }) call from this recovery path (leave extractSummary(...)
and the await saveFeatureSummary(...) intact) so the summary is only emitted
once by saveFeatureSummary; alternatively, if you prefer central emission,
remove the emission from saveFeatureSummary and document that emit
responsibility moves to the caller, but do not keep both.
- Around line 4126-4137: The recovery task is calling provider.executeQuery with
bareModel which bypasses providerResolvedModel mapping; update the executeQuery
call in the recovery path to use effectiveBareModel (the variable already
computed) instead of bareModel so the resolved model ID is used consistently for
non‑Claude providers—locate the provider.executeQuery invocation that returns
taskStream and swap the bareModel argument for effectiveBareModel.

In `@apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx`:
- Around line 592-602: The requirePlanApproval checkbox can remain true when
planningMode is 'skip' or 'lite'; update the component to normalize that by
clearing or forcing false for the requirePlanApproval state whenever
planningMode changes to 'skip' or 'lite' and by masking the checkbox checked
prop when planningMode is 'skip' or 'lite' (the checkbox with id
"add-feature-require-approval" / data-testid
"add-feature-require-approval-checkbox" and the requirePlanApproval state
variable). Implement this via a useEffect watching planningMode to
setRequirePlanApproval(false) when mode is 'skip'|'lite', and ensure the input's
checked uses planningMode === 'skip' || planningMode === 'lite' ? false :
requirePlanApproval so the payload built in the submit function (where
requirePlanApproval is read) never carries true while planning is disabled; keep
behavior unchanged for other modes and mirror logic used in PlanningModeSelect.

@Monoquark
Copy link

Monoquark commented Jan 24, 2026

Update for my test report:

Tested using GLM 4.7 Coder via OpenCode:

Manual testing: Create feature with spec/full plan mode using non-Claude model -- WORKS RELIABLY

Manual testing: Restart server during feature execution, verify resume works -- WORKS, earlier issues could not be reproduced and might have been me stinging on RAM while using Electron

Manual testing: Verify task progress updates in real-time on feature card -- WORKS

>> Manual testing: Verify correct summary appears in agent output

  • 5/8 finished features received summaries, 3 did not
  • One summary again seems to break after ":", full summary: "Added route change event listener system to js/router.js:8:"
  • One summary was probably stupid model, instead of the DB access layer implementation summary it gave me a testing summary - after 17 tasks!!
Task T016 completed successfully:

Ran Playwright test suite with npm test
All 70 tests passed across 6 test files:
Chart Rendering tests: 23 tests
CRUD Operations tests: 14 tests
Database Singleton tests: 6 tests
Offline Functionality tests: 11 tests
Sample Data Generation tests: 15 tests
Schema Initialization tests: 5 tests
Test execution time: 6.8 seconds
No test failures or issues to fixI'll help you delete the temporary verification test file. Let me first s...

- Changed model references from `bareModel` to `effectiveBareModel` in multiple locations to ensure consistency.
- Removed redundant event emission for `auto_mode_summary` after saving feature summaries.
- Added checks to prevent resuming features that are already running, enhancing error handling.
- Introduced a new useEffect in various dialogs to clear `requirePlanApproval` when planning mode is set to 'skip' or 'lite'.
- Updated prompt templates to enforce a structured summary output format, ensuring critical information is captured after task completion.
…ialog

- Changed the data-testid from "add-feature-require-approval-checkbox" to "add-feature-planning-require-approval-checkbox" for better clarity and consistency in testing.
@Monoquark
Copy link

Another test run with 10 features, only two of them with incomplete / irrelevant summaries. For some reason those feature cards did not show the tasks while in progress but the task list was visible in the Logs view so I let them run. The summaries were again about the tests, or sth like "wow, I didnt need to do much, somebody else did all my work". Have not yet found a pattern, nothing in the CLI log.

@Shironex
Copy link
Collaborator Author

Another test run with 10 features, only two of them with incomplete / irrelevant summaries. For some reason those feature cards did not show the tasks while in progress but the task list was visible in the Logs view so I let them run. The summaries were again about the tests, or sth like "wow, I didnt need to do much, somebody else did all my work". Have not yet found a pattern, nothing in the CLI log.

did u pull the latest changes i added to include proper summaries blocks in prompts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Do Not Merge Use this label if something should not be merged. Testers-Requested Request for others to test an enhancement or bug fix/etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants