Skip to content

[P1] Implement Project.pause() with flash save mechanism #103

Description

@frankbria

Overview

The Project.pause() method needs to implement flash save to preserve context before pausing execution.

Current State

File: codeframe/core/project.py lines 69-71

def pause(self) -> None:
    """Pause project execution."""
    # TODO: Implement flash save before pause
    self._status = ProjectStatus.PAUSED

Expected Behavior

  • Trigger flash save to create checkpoint
  • Archive COLD tier context items
  • Save current agent states
  • Update project status to PAUSED
  • Persist pause timestamp
  • Broadcast project_paused event

Implementation Requirements

  1. Call WorkerAgent.flash_save() for each active agent
  2. Create checkpoint via CheckpointManager
  3. Archive context items with tier=COLD
  4. Update project status in database
  5. Record pause timestamp for resume calculation
  6. Broadcast WebSocket event

Acceptance Criteria

  • Flash save creates checkpoint before pause
  • COLD context items archived correctly
  • Project status updated to PAUSED
  • Resume can restore from paused state
  • No context loss during pause/resume cycle
  • WebSocket event notifies clients

Priority

P1 - Critical: Required for long-running projects that need to pause.

References

  • Flash save docs: CLAUDE.md lines 100-109
  • Issues Analysis: CODEFRAME_ISSUES_ANALYSIS.md lines 106-113

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions