Skip to content

Commit cc4299c

Browse files
committed
docs: add background task concurrency configuration guide to all READMEs
1 parent 83676b3 commit cc4299c

File tree

3 files changed

+102
-0
lines changed

3 files changed

+102
-0
lines changed

README.ja.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,40 @@ Oh My OpenCode は以下の場所からフックを読み込んで実行しま
907907
| `planner_enabled` | `true` | `true` の場合、Planner-Sisyphus エージェントを有効化します(OpenCode plan と同じ、SDK 制限により名前変更)。デフォルトで有効です。 |
908908
| `replace_plan` | `true` | `true` の場合、デフォルトのプランエージェントをサブエージェントモードに降格させます。`false` に設定すると、Planner-Sisyphus とデフォルトのプランの両方を利用できます。 |
909909

910+
### Background Tasks
911+
912+
バックグラウンドエージェントタスクの同時実行数を設定します。並列で実行できるバックグラウンドエージェントの数を制御します。
913+
914+
```json
915+
{
916+
"background_task": {
917+
"defaultConcurrency": 5,
918+
"providerConcurrency": {
919+
"anthropic": 3,
920+
"openai": 5,
921+
"google": 10
922+
},
923+
"modelConcurrency": {
924+
"anthropic/claude-opus-4-5": 2,
925+
"google/gemini-3-flash": 10
926+
}
927+
}
928+
}
929+
```
930+
931+
| オプション | デフォルト | 説明 |
932+
| --------------------- | ---------- | -------------------------------------------------------------------------------------------------------------- |
933+
| `defaultConcurrency` | - | すべてのプロバイダー/モデルに対するデフォルトの最大同時バックグラウンドタスク数 |
934+
| `providerConcurrency` | - | プロバイダーごとの同時実行制限。キーはプロバイダー名(例:`anthropic``openai``google`|
935+
| `modelConcurrency` | - | モデルごとの同時実行制限。キーは完全なモデル名(例:`anthropic/claude-opus-4-5`)。プロバイダー制限より優先されます。 |
936+
937+
**優先順位**: `modelConcurrency` > `providerConcurrency` > `defaultConcurrency`
938+
939+
**ユースケース**:
940+
- 高価なモデル(例:Opus)を制限してコストの急増を防ぐ
941+
- 高速で安価なモデル(例:Gemini Flash)により多くの同時タスクを許可する
942+
- プロバイダーレベルの上限を設定してプロバイダーのレートリミットを遵守する
943+
910944
### Hooks
911945

912946
`~/.config/opencode/oh-my-opencode.json` または `.opencode/oh-my-opencode.json``disabled_hooks` を通じて特定の内蔵フックを無効化できます:

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,40 @@ You can also customize Sisyphus agents like other agents:
969969
| `planner_enabled` | `true` | When `true`, enables Planner-Sisyphus agent (same as OpenCode plan, renamed due to SDK limitations). Enabled by default. |
970970
| `replace_plan` | `true` | When `true`, demotes default plan agent to subagent mode. Set to `false` to keep both Planner-Sisyphus and default plan available. |
971971

972+
### Background Tasks
973+
974+
Configure concurrency limits for background agent tasks. This controls how many parallel background agents can run simultaneously.
975+
976+
```json
977+
{
978+
"background_task": {
979+
"defaultConcurrency": 5,
980+
"providerConcurrency": {
981+
"anthropic": 3,
982+
"openai": 5,
983+
"google": 10
984+
},
985+
"modelConcurrency": {
986+
"anthropic/claude-opus-4-5": 2,
987+
"google/gemini-3-flash": 10
988+
}
989+
}
990+
}
991+
```
992+
993+
| Option | Default | Description |
994+
| --------------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
995+
| `defaultConcurrency` | - | Default maximum concurrent background tasks for all providers/models |
996+
| `providerConcurrency` | - | Per-provider concurrency limits. Keys are provider names (e.g., `anthropic`, `openai`, `google`) |
997+
| `modelConcurrency` | - | Per-model concurrency limits. Keys are full model names (e.g., `anthropic/claude-opus-4-5`). Overrides provider limits. |
998+
999+
**Priority Order**: `modelConcurrency` > `providerConcurrency` > `defaultConcurrency`
1000+
1001+
**Use Cases**:
1002+
- Limit expensive models (e.g., Opus) to prevent cost spikes
1003+
- Allow more concurrent tasks for fast/cheap models (e.g., Gemini Flash)
1004+
- Respect provider rate limits by setting provider-level caps
1005+
9721006
### Hooks
9731007

9741008
Disable specific built-in hooks via `disabled_hooks` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`:

README.zh-cn.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,40 @@ Sisyphus Agent 也能自定义:
911911
| `planner_enabled` | `true` | 设为 `true` 就启用 Planner-Sisyphus Agent(与 OpenCode plan 相同,因 SDK 限制仅改名)。默认启用。 |
912912
| `replace_plan` | `true` | 设为 `true` 就把默认计划 Agent 降级为子 Agent 模式。设为 `false` 可以同时保留 Planner-Sisyphus 和默认计划。 |
913913

914+
### Background Tasks(后台任务)
915+
916+
配置后台 Agent 任务的并发限制。这控制了可以同时运行多少个并行后台 Agent。
917+
918+
```json
919+
{
920+
"background_task": {
921+
"defaultConcurrency": 5,
922+
"providerConcurrency": {
923+
"anthropic": 3,
924+
"openai": 5,
925+
"google": 10
926+
},
927+
"modelConcurrency": {
928+
"anthropic/claude-opus-4-5": 2,
929+
"google/gemini-3-flash": 10
930+
}
931+
}
932+
}
933+
```
934+
935+
| 选项 | 默认值 | 说明 |
936+
| --------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
937+
| `defaultConcurrency` | - | 所有提供商/模型的默认最大并发后台任务数 |
938+
| `providerConcurrency` | - | 按提供商设置并发限制。键是提供商名称(例如:`anthropic``openai``google`|
939+
| `modelConcurrency` | - | 按模型设置并发限制。键是完整的模型名称(例如:`anthropic/claude-opus-4-5`)。会覆盖提供商级别的限制。 |
940+
941+
**优先级顺序**: `modelConcurrency` > `providerConcurrency` > `defaultConcurrency`
942+
943+
**使用场景**:
944+
- 限制昂贵的模型(如 Opus)以防止成本飙升
945+
- 允许快速/便宜的模型(如 Gemini Flash)执行更多并发任务
946+
- 通过设置提供商级别上限来遵守提供商的速率限制
947+
914948
### Hooks
915949

916950
`~/.config/opencode/oh-my-opencode.json``.opencode/oh-my-opencode.json``disabled_hooks` 里关掉你不想要的内置 hook:

0 commit comments

Comments
 (0)