mirror of
https://github.com/cexll/myclaude.git
synced 2025-12-24 13:47:58 +08:00
fix(codeagent-wrapper): add worker limit cap and remove legacy alias
- Add maxParallelWorkersLimit=100 cap for CODEAGENT_MAX_PARALLEL_WORKERS - Remove scripts/install.sh (codex-wrapper legacy alias no longer needed) - Fix README command example: /gh-implement -> /gh-issue-implement - Add TestResolveMaxParallelWorkers unit test for limit validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -249,6 +249,8 @@ func parseArgs() (*Config, error) {
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
const maxParallelWorkersLimit = 100
|
||||
|
||||
func resolveMaxParallelWorkers() int {
|
||||
raw := strings.TrimSpace(os.Getenv("CODEAGENT_MAX_PARALLEL_WORKERS"))
|
||||
if raw == "" {
|
||||
@@ -261,5 +263,10 @@ func resolveMaxParallelWorkers() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
if value > maxParallelWorkersLimit {
|
||||
logWarn(fmt.Sprintf("CODEAGENT_MAX_PARALLEL_WORKERS=%d exceeds limit, capping at %d", value, maxParallelWorkersLimit))
|
||||
return maxParallelWorkersLimit
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user