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
- File-based streaming: Agent writes to log file, follow command tails it
- WebSocket/SSE: Real-time event stream (prepares for server layer)
- 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
Related
- Part of Phase 1 CLI completion
- Prepares foundation for Phase 2 server real-time events
Summary
Implement
cf work follow <task-id>command for real-time streaming of agent execution output.Problem
Currently
--verbosemode 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
Features
Technical Implementation
Options
Recommendation: Start with file-based (simplest), design for upgrade to WebSocket.
Files to modify
codeframe/core/runtime.py- Add log streaming supportcodeframe/core/agent.py- Write to streamable outputcodeframe/cli/app.py- Addwork followcommandAcceptance Criteria
cf work follow <task-id>streams live output--verbosemode contentRelated