Repository navigation
feat(agent): 维度5 背景默认 spawn FUSION_SUBAGENT_DEFAULT_BACKGROUND (P2.1, #126) - #127
Merged
Merged
Conversation
shouldRunAsync 加第 6 || 项: (!isInProcessTeammate() && isSubagentDefaultBackground())。 env 开关让默认子代理 spawn 即后台 (非队友) 解阻塞主 turn。async-from-start 复用既有 registerAsyncAgent (isBackgrounded:true 立即, 无 timer) + runAsyncAgentLifecycle。 与 item 12 FUSION_SUBAGENT_AUTO_BACKGROUND_MS 正交: item 12 是 foreground else 分支 mid-run 后台化定时器; 本开关是 async-from-start。 !isInProcessTeammate() guard 复用 line 455 既有 throw 模式 (in-process 队友生命周期 绑 leader 进程不可后台)。default off (isEnvTruthy 未设/空/false/0 → false), byte-identical 旧行为, 无独立 feature flag。对齐 PR #82/#94/#99 env-gated opt-in。 新 isSubagentDefaultBackground() helper (autoBackground.ts, sibling item 12 模式), +11 单测 (truthy/fail-off/default-off 全覆盖)。 gates: typecheck 0 / 18 新+旧单测 pass / 407 全套无回归 / build:dev pass / biome baseline 不变 (变更文件 0 新 error)。 closes #126 Co-Authored-By: Claude Fable 5 <[email protected]>
dahai80
added a commit
that referenced
this pull request
Aug 22, 2026
Patch release bundling 17 commits since v0.4.23: - item 15(a) MLX OOM auto-recovery gc+retry (#129) - #7 one-click diagnostic fixAction framework (#131) - 维度5 background-default spawn FUSION_SUBAGENT_DEFAULT_BACKGROUND (#127) - #4 proactive MLX OOM detection via /v1/health (#125) - item 17 fullscreen pre-compact history + :598 synthetic decouple (#123) - item 25B workflow stagger fan-out (#122) - item 21 auto-mode local rule classifier test coverage (#120) - item 23 archive plugin source + SHA-256 lock (#118) - item 24 marketplace command source (#116) - item 6 transcript disk trimming + crash-safe checkpoint (#114) - item 5 normalizeMessages secondary normalize cache (#112) - item 19 screen-reader plaintext render (#110) - item 16 compact retry countdown + stall hint (#108) - item 25A workflow execution runtime docs (#106) - item 25A minimal workflow execution runtime (#105) - item 12 subagent auto-background threshold (#103) - item 20 vimInsertModeRemaps dual-key INSERT sequence (#101) Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
closes #126
enhance-0819.md P2.1 子代理护栏五维度:
缺口
shouldRunAsync(AgentTool.tsx) = 5 个 force-async OR 条件, 用户无 env 开关让默认子代理 spawn 即后台 (非队友) 解阻塞主 turn。item 12 (FUSION_SUBAGENT_AUTO_BACKGROUND_MS, PR #103) 是正交路径 — 只影响 foreground else 分支 mid-run 后台化定时器, 非 async-from-start。落地 (surgical, +90/-1, 3 文件)
autoBackground.ts加isSubagentDefaultBackground()解析FUSION_SUBAGENT_DEFAULT_BACKGROUND(isEnvTruthy, default off)AgentTool.tsxshouldRunAsync加第 6||项:(!isInProcessTeammate() && isSubagentDefaultBackground())registerAsyncAgent(isBackgrounded:true 立即, 无 timer) +runAsyncAgentLifecycle!isInProcessTeammate()guard 复用 line 455 既有 throw 模式 (in-process 队友生命周期绑 leader 进程不可后台)subagentAutoBackground.test.ts+11 单测 (truthy/fail-off/default-off 全覆盖)设计
gates
影响范围
默认行为零变更。仅当用户显式设
FUSION_SUBAGENT_DEFAULT_BACKGROUND=1(或 true/yes/on) 时, 默认子代理 spawn 即后台化 (非 in-process 队友)。失控子代理仍受维度 1-4 护栏 (并发/会话/深度/预算) 约束。Co-Authored-By: Claude Fable 5 [email protected]