Skip to content

[Phase 1] cf work follow - Live execution streaming #308

Description

@frankbria

Summary

Implement cf work follow <task-id> command for real-time streaming of agent execution output.

Problem

Currently --verbose mode outputs progress but requires watching from the start. Users need ability to attach to running executions and see real-time progress.

Proposed Solution

Command Interface

cf work follow <task-id>           # Attach to running execution
cf work follow <task-id> --tail N  # Show last N lines then stream

Features

  • Real-time stdout/stderr streaming from agent execution
  • Attach to already-running executions
  • Show buffered output when attaching mid-execution
  • Graceful handling of execution completion

Technical Implementation

Options

  1. File-based streaming: Agent writes to log file, follow command tails it
  2. WebSocket/SSE: Real-time event stream (prepares for server layer)
  3. Named pipe: UNIX-style inter-process communication

Recommendation: Start with file-based (simplest), design for upgrade to WebSocket.

Files to modify

  • codeframe/core/runtime.py - Add log streaming support
  • codeframe/core/agent.py - Write to streamable output
  • codeframe/cli/app.py - Add work follow command

Acceptance Criteria

  • cf work follow <task-id> streams live output
  • Can attach to already-running executions
  • Shows buffered output on attach
  • Handles execution completion gracefully
  • Output matches --verbose mode content

Related

  • Part of Phase 1 CLI completion
  • Prepares foundation for Phase 2 server real-time events

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-1Phase 1: CLI Foundation Completion

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions