Commit 46ab601
fix(session-registry): drop custom taskKey from sessions.create to avoid upstream contract mismatch
Removes `taskKey: discord-thread-${threadId}` from the
`ctx.agents.sessions.create()` call in `spawnAgentInThread`. PaperClip's
plugin-host honors arbitrary taskKey values at create time, but every
subsequent SDK op (sendMessage/list/close) filters sessions by
`taskKey LIKE 'plugin:${pluginKey}:session:%'`. Custom keys orphan the
session — sendMessage immediately throws `Session not found`, falling
through to the ACP fallback which has no consumer in default installs.
The custom taskKey was decorative (grepped — never read elsewhere in
the plugin). Dropping it lets the host generate the prefixed default
form so downstream ops succeed.
Fixes #49. Related: paperclipai/paperclip#6156 (upstream root cause).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6a18c6b commit 46ab601
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
277 | 278 | | |
278 | | - | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| |||
0 commit comments