{"record":{"id":"fec34925374d0352","repo":"sipeed/picoclaw","slug":"w-all-d-slots-occupied-for-v","errorCode":null,"errorMessage":"%w: all %d slots occupied for %v","messagePattern":"%w: all (.+?) slots occupied for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/agent/subturn.go","lineNumber":306,"sourceCode":"\t\t// Create a timeout context for semaphore acquisition\n\t\ttimeoutCtx, cancel := context.WithTimeout(ctx, rtCfg.concurrencyTimeout)\n\t\tdefer cancel()\n\n\t\tselect {\n\t\tcase parentTS.concurrencySem <- struct{}{}:\n\t\t\tsemAcquired = true\n\t\t\tdefer func() {\n\t\t\t\tif semAcquired {\n\t\t\t\t\t<-parentTS.concurrencySem\n\t\t\t\t}\n\t\t\t}()\n\t\tcase <-timeoutCtx.Done():\n\t\t\t// Check parent context first - if it was canceled, propagate that error\n\t\t\tif ctx.Err() != nil {\n\t\t\t\treturn nil, ctx.Err()\n\t\t\t}\n\t\t\t// Otherwise it's our timeout\n\t\t\treturn nil, fmt.Errorf(\"%w: all %d slots occupied for %v\",\n\t\t\t\tErrConcurrencyTimeout, rtCfg.maxConcurrent, rtCfg.concurrencyTimeout)\n\t\t}\n\t}\n\n\t// 1. Depth limit check\n\tif parentTS.depth >= rtCfg.maxDepth {\n\t\tlogger.WarnCF(\"subturn\", \"Depth limit exceeded\", map[string]any{\n\t\t\t\"parent_id\": parentTS.turnID,\n\t\t\t\"depth\":     parentTS.depth,\n\t\t\t\"max_depth\": rtCfg.maxDepth,\n\t\t})\n\t\treturn nil, ErrDepthLimitExceeded\n\t}\n\n\t// 2. Config validation: Model is required unless TargetAgentID is set\n\t//    (the target agent provides its own model).\n\tif cfg.Model == \"\" && cfg.TargetAgentID == \"\" {\n\t\treturn nil, ErrInvalidSubTurnConfig","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/agent/subturn.go#L288-L324","documentation":"Error \"%w: all %d slots occupied for %v\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/agent/subturn.go:306 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}