diff options
| author | GoldJohnKing <GoldJohnKing@live.cn> | 2026-08-30 00:15:41 +0800 |
|---|---|---|
| committer | GoldJohnKing <GoldJohnKing@live.cn> | 2026-08-30 00:15:41 +0800 |
| commit | f467a6134e2ff72c9658babf04388bf36d7635a0 (patch) | |
| tree | 3dc51c7103c734a68ab0c9ca63284afde78ccf55 /docs/README.opencode.md | |
| parent | fd02874aa5c55ba3c2bca431253b48e0e4c8be5a (diff) | |
fix(opencode): skip controller bootstrap in task subagent sessions (#2160)
The messages.transform hook injects the using-superpowers bootstrap into
the first user message of every session, including task subagent
children. Workers then restart brainstorming/design cycles for work the
parent already authorised — the <SUBAGENT-STOP> note inside the
bootstrap only works when the model chooses to honor it.
Detect child sessions structurally instead: OpenCode task sessions are
created with a parentID, so when the session carrying the message has a
parentID, skip bootstrap injection. The hook receives no input at
runtime (verified in the 1.18.x bundle: trigger(..., {}, {messages})),
so the sessionID is taken from firstUser.info.sessionID and the session
record is fetched via client.session.get({path:{id}}).
The decision is cached per session; lookup failures fail open (previous
inject-always behavior) and are not cached so transient errors recover.
Skills registration is untouched — workers keep explicit access to
execution skills.
Diffstat (limited to 'docs/README.opencode.md')
0 files changed, 0 insertions, 0 deletions
