fix(feishu): return subagent thread delivery origin#83190
Conversation
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. by source inspection. Current main's Feishu subagent_spawning hook binds the child conversation but returns no deliveryOrigin, while the generic session-spawn path only directly routes the initial child run when result.deliveryOrigin is present. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this narrow Feishu plugin hook and regression-test change after exact-head checks, without changing generic spawn routing or adding configuration. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection. Current main's Feishu subagent_spawning hook binds the child conversation but returns no deliveryOrigin, while the generic session-spawn path only directly routes the initial child run when result.deliveryOrigin is present. Is this the best way to solve the issue? Yes. Reusing the existing Feishu delivery-origin resolver immediately after a successful bind is the narrowest maintainable fix and keeps the generic spawn contract unchanged. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 59b85d4eb979. |
|
@clawsweeper automerge |
|
🦞🔧 Repair: kept the fix on this contributor branch instead of opening a replacement PR. Current state: exact-head review queued immediately; GitHub checks and the review verdict gate final merge. Automerge progress:
|
4dfff17 to
44a6200
Compare
Summary
subagent_spawningafter a child session bind succeedsCloses #83189.
Complements #83172 / #83170 by applying the same delivery-origin contract to Feishu/Lark.
Why
The generic
sessions_spawn(thread=true, mode="session")path can only deliver the initial child run directly to the bound child conversation when the channel hook returns a routabledeliveryOrigin. Feishu already had the bound conversation data but returned onlythreadBindingReady=true.Real Behavior Proof
subagent_spawningnow returns the bound conversationdeliveryOriginafter a successful thread-bound child session bind, so the generic spawn path has a routable initial child delivery target.handleFeishuSubagentSpawning, and printed the returned hook result for a topic conversation.{ "status": "ok", "threadBindingReady": true, "deliveryOrigin": { "channel": "feishu", "accountId": "work", "to": "chat:oc_group_chat", "threadId": "om_topic_root" } }deliveryOrigin.channel="feishu",deliveryOrigin.to="chat:oc_group_chat", anddeliveryOrigin.threadId="om_topic_root"immediately after binding succeeds. Before this patch the same code path returned only{ status: "ok", threadBindingReady: true }.sessions_spawndelivery path consumes.Verification
./node_modules/.bin/vitest run extensions/feishu/src/subagent-hooks.test.tsTest Files 1 passed (1)Tests 11 passed (11)./node_modules/.bin/oxfmt --check --threads=1 extensions/feishu/src/subagent-hooks.ts extensions/feishu/src/subagent-hooks.test.tsgit diff --check HEAD~1..HEADRisk
Low. The change is limited to the Feishu/Lark subagent hook result and uses the same delivery-origin resolver already used by completion delivery.