Skip to content

[P1] Discovery enters stuck state on new project creation - no current question #255

@frankbria

Description

@frankbria

Problem

Newly created projects enter a "stuck state" in the discovery phase where no current question is available. The backend logs show repeated warnings about this condition.

Backend Logs (repeated for each new project)

Project 89: Discovery in stuck state - no current question
Project 90: Discovery in stuck state - no current question
Project 91: Discovery in stuck state - no current question
...

Observed Pattern

  • Issue occurs immediately after project creation
  • Affects projects created via UI during E2E tests
  • Projects are in discovery phase but have no question to display
  • May be related to [P1] Restart Discovery button non functional #247 (Restart Discovery non-functional) but affects NEW projects

Impact

  • New project creation appears broken to users
  • Discovery can't proceed without a question
  • User left on dashboard with no actionable state
  • Forces manual intervention or project recreation

Possible Root Causes

  1. Discovery initialization not generating first question
  2. Race condition between project creation and discovery start
  3. Question generation fails silently
  4. Discovery state not properly initialized

Related Issues

Affected Files

  • codeframe/discovery/ module
  • codeframe/ui/routers/discovery.py
  • codeframe/agents/lead_agent.py (discovery orchestration)

Expected Behavior

  1. User creates new project
  2. Discovery starts automatically
  3. First discovery question is immediately available
  4. User can answer questions without intervention

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-high-betaHigh priority - should fix before beta for best experiencebugSomething isn't workingtestinguxv1-legacyV1-specific issue, retained as reference for Phase 3 UI rebuild

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions