fix(discord): pass config to subagent thread binding#70945
fix(discord): pass config to subagent thread binding#70945steipete merged 3 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR forwards Confidence Score: 5/5Safe to merge — one-line bug fix with targeted test coverage and no interface changes. The change is minimal, correct, and directly mirrors how api.config is already used elsewhere in the same file (e.g., resolveThreadBindingFlags). The test update properly asserts the new argument shape. No architectural concerns or missing guards were identified. No files require special attention. Reviews (3): Last reviewed commit: "fix(discord): pass config to subagent th..." | Re-trigger Greptile |
|
Closing for now. This was a provisional patch from local investigation; I need to verify intended usage/upstream behavior before proposing a fix. |
|
Reopening as a draft fix for #71054. Keeping draft while we validate the linked bug report and maintainer expectations. |
febf39e to
527802e
Compare
527802e to
e704e6c
Compare
|
Landed via rebase onto
Added the requested hardening by making Thanks @jai! |
Summary
Describe the problem and fix in 2–5 bullets:
autoBindSpawnedDiscordSubagentwithout the resolved runtime config.api.configintoautoBindSpawnedDiscordSubagentand update the hook regression test to assert that config is passed.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
subagent_spawninghook omittedcfg: api.configwhen delegating toautoBindSpawnedDiscordSubagent, while downstream channel resolution can require runtime config even when a token is available.autoBindSpawnedDiscordSubagent, and the hook test asserted the old delegated call shape without cfg.Regression Test Plan (if applicable)
extensions/discord/src/subagent-hooks.test.tssubagent_spawningforwards the resolved Discord runtime config intoautoBindSpawnedDiscordSubagent.User-visible / Behavior Changes
Discord thread-bound subagent sessions should be able to use the runtime config during auto-bind channel resolution instead of failing with the generic bind error when config is required.
Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
spawnSubagentSessions=trueSteps
subagent_spawninghook for a thread-requested subagent session.autoBindSpawnedDiscordSubagentand inspect the delegated arguments.api.configto auto-bind.Expected
cfg: api.config.Actual
Evidence
Targeted verification:
Human Verification (required)
Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations