Skip to content

[Phase 5] Debug and replay mode #315

@frankbria

Description

@frankbria

Summary

Enable stepping through past executions for debugging and learning.

Problem

When agent execution fails or produces unexpected results, it's hard to understand what happened. Need ability to replay and inspect past runs.

Proposed Solution

Execution Recording

  • Record all LLM prompts/responses
  • Track file operations with before/after state
  • Log decision points and branching

Replay Mode

cf work replay <run-id>            # Step through execution
cf work replay <run-id> --step N   # Jump to step N
cf work diff <run-id>              # Show all file changes

Debug Features

  • Step forward/backward through execution
  • Inspect context at each step
  • Compare expected vs actual outputs
  • "What-if" re-execution with modified inputs

Acceptance Criteria

  • Execution details recorded to database
  • Replay command shows step-by-step execution
  • File diffs available at each step
  • Execution can be re-run from any checkpoint
  • Export execution trace for analysis

Related

  • Useful for debugging self-correction loop
  • Enables learning from successful executions

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-5Phase 5: Advanced Features & Polish

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions