Problem
The current channel system uses repository-level locking instead of session-based locking, preventing multiple users from working simultaneously on the same repository.
Current Behavior
Channel Identifier: channel = repository_name (from packages/pybackend/app.py:502)
# Only ONE agent can run per repository across ALL sessions
def _mark_channel_processing(channel: str) -> bool:
with _processing_lock:
if channel in _processing_channels: # Global lock per repo
return False # HTTP 409 Conflict to ALL sessions
Impact on Multi-User Workflows
Scenario:
👤 Developer A: Working on "my-project" → Starts agent → Channel locked
👤 Developer B: Working on "my-project" → Gets HTTP 409 Conflict
👤 Developer C: Reviewing "my-project" → Also blocked
⏱️ 3 minutes later: Developer A completes → Everyone else can proceed
Problems:
- 🚫 No concurrent development on popular repositories
- 🚫 Demo failures when multiple people access the same project
- 🚫 Poor team collaboration experience with cryptic 409 errors
Proposed Solution
Session-Based Channel System
Change from:
channel = name # Repository-wide lock (current)
Change to:
channel = f"{name}:{session_id}" # Per-session lock (proposed)
Benefits
- ✅ Multiple users can work simultaneously on same repository
- ✅ Session isolation prevents cross-talk between concurrent runs
- ✅ Better team collaboration experience
- ✅ Eliminates demo/presentation failures
Technical Considerations
Files to Modify:
packages/pybackend/agent_service.py - Channel management system
packages/pybackend/app.py - All agent endpoint handlers
- Tests for concurrent session behavior
Risks to Address:
- Workspace file conflicts during concurrent operations
- Resource contention (CPU, memory, file locks)
- Data consistency between concurrent agent runs
- Proper cleanup of session-based channels
Acceptance Criteria
Related Issues
Priority
Medium - Improves team workflows but current single-session behavior is acceptable for now.
Epic
Multi-user concurrent development support
Problem
The current channel system uses repository-level locking instead of session-based locking, preventing multiple users from working simultaneously on the same repository.
Current Behavior
Channel Identifier:
channel = repository_name(frompackages/pybackend/app.py:502)Impact on Multi-User Workflows
Scenario:
Problems:
Proposed Solution
Session-Based Channel System
Change from:
Change to:
Benefits
Technical Considerations
Files to Modify:
packages/pybackend/agent_service.py- Channel management systempackages/pybackend/app.py- All agent endpoint handlersRisks to Address:
Acceptance Criteria
Related Issues
Priority
Medium - Improves team workflows but current single-session behavior is acceptable for now.
Epic
Multi-user concurrent development support