()
| 2958 | ); |
| 2959 | const activeAgentCount = this.countActiveAgentTasks(cfg); |
| 2960 | const ensureParallelSlot = async (): Promise<Result<void, string>> => { |
| 2961 | const activeWorkspaceTurnCount = await this.countActiveWorkspaceTurns(allWorkspaceTurns); |
| 2962 | const activeCount = activeAgentCount + activeWorkspaceTurnCount; |
| 2963 | if (activeCount >= taskSettings.maxParallelAgentTasks) { |
| 2964 | return Err( |
| 2965 | `Task.createWorkspaceTurn: maxParallelAgentTasks exceeded (active=${activeCount}, max=${taskSettings.maxParallelAgentTasks})` |
| 2966 | ); |
| 2967 | } |
| 2968 | return Ok(undefined); |
| 2969 | }; |
| 2970 | |
| 2971 | const handleId = `${WORKSPACE_TURN_TASK_ID_PREFIX}${this.config.generateStableId()}`; |
| 2972 | const turnId = this.config.generateStableId(); |
nothing calls this directly
no test coverage detected