squad-sdk: spawnAgent ignores the persistent reasoning-effort and context-tier settings that its own commit documents
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 82/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
閱讀 packages/squad-sdk/src/agents/lifecycle.ts 和 packages/squad-sdk/src/config/models.ts 中的持久設定解析器。接著檢查 test/lifecycle.test.ts 中的 spawn 測試,其中已擷取 createSession 設定。為 defaultReasoningEffort 和 defaultContextTier 新增測試涵蓋;當這兩個值都傳遞至 session,且文件中記載的優先順序經過驗證時,此 issue 即已解決。
由索引模型根據 Issue 內容生成。
描述
Summary
The two commits that threaded reasoning effort and context tier through agent spawning introduced
three things together:
- the readers and the layered resolver in
packages/squad-sdk/src/config/models.ts
(readReasoningEffort,readAgentReasoningEffortOverrides, and the tier equivalents, 333 lines); - the template documentation that promises the layer --
.squad-templates/squad.agent.md, "1.
Persistent Config:.squad/config.json?agentReasoningEffortOverrides.{agentName}, then
defaultReasoningEffort"; - and the inline resolution in
AgentLifecycleManager.spawnAgentthat skips it:
const rawEffort = reasoningEffortOverride
|| agentConfig.resolvedReasoningEffort
|| undefined;
Environment
github/squad(the report was written against thebradygaster/squadfork, which carries the same
commits;devhas the identical lines atpackages/squad-sdk/src/agents/lifecycle.ts:328)- effort:
264b87612a--feat(sdk): thread reasoningEffort through agent spawning pipeline (#1148),
Co-authored-by: Copilot <[email protected]> - tier:
f682ecb7ad--feat(sdk,cli): thread contextTier through agent spawning pipeline (#1448),
Co-authored-by: Copilot App <[email protected]>
Steps to reproduce
test/lifecycle.test.ts already wraps createSession and keeps every config in
sessionConfigs, and it already asserts on sessionConfigs[0].model for the persistent-config cases
(agentModelOverrides, defaultModel, 'auto'). The effort and the tier are the only two settings
that file never asserts on.
Take one of those cases, add defaultReasoningEffort and defaultContextTier to the
.squad/config.json it writes, and assert the same way:
expect(sessionConfigs[0]?.reasoningEffort).toBe('high');
expect(sessionConfigs[0]?.contextTier).toBe('long_context');
The capture itself needs no change -- it is the file's own.
Actual behavior
Running one of those persistent-config cases with defaultReasoningEffort: "high" and
defaultContextTier: "long_context" added to the config file, and no effort or tier anywhere else,
the object handed to createSession is:
{ "model": "charter-model", "systemMessage": { "content": "..." } }
reasoningEffort and contextTier are both absent (undefined), while model is the one the
charter names -- so the spawn ran, the config file was read, and only these two settings never reached
the session. Adding the assertion to that case fails:
AssertionError: expected undefined to be 'high' // Object.is equality
- Expected: "high"
+ Received: undefined
Changing one input at a time, the same capture shows which layers do arrive:
| variant | .squad/config.json |
charter | spawn option | reasoningEffort in the session |
|---|---|---|---|---|
| A | defaultReasoningEffort: high |
none | none | undefined |
| B | none | **Reasoning Effort:** medium |
none | "medium" |
| C | defaultReasoningEffort: high |
none | reasoningEffortOverride: low |
"low" |
| D | defaultReasoningEffort: high |
**Reasoning Effort:** medium |
none | "medium" |
A is the documented layer 1 and the only one that produces nothing. D shows the persistent value
losing to a charter value the documentation ranks below it. The tier behaves the same way: a charter
naming **Context Tier:** long_context reaches the session, defaultContextTier does not.
Expected behavior
{ "model": "claude-sonnet-5.5", "reasoningEffort": "high", "contextTier": "long_context" }
Suggested fix
The resolver the same commits added already implements the documented order; call it instead of
resolving inline:
const rawEffort = resolveReasoningEffort({
agentName, squadDir,
spawnOverride: reasoningEffortOverride,
charterPreference: agentConfig.resolvedReasoningEffort,
});
Failing that, add the two persistent lookups in front of the charter value.
- 主要語言
- TypeScript
- 星號
- 3.4k
- 分支
- 516
- 平均合併
- 1 天 15 小時
- 30 天內合併 PR
- 116
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/squad 的其他 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
In-app coordinator/Ralph never reads .squad/ralph-instructions.md; only `squad watch --execute` does未關閉wave:2-soon
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
相似的 Issue
-
bot:ai-assisted component:platform-js status:untriaged
難度 1/5 1 小時以內 新手友好度 74/100
midnightntwrk/platform-js#38 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
ranxianglei/billion-context#7068 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
難度 2/5 1-3 小時 新手友好度 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
ilan-pinto/roaring-lions#1552 ·
維護者通常 1 天內回覆