fix(background-agent): pass query directory to session.get in 4 call-sites (#2937)

resolveSubagentSpawnContext and related lookups called client.session.get
without the query.directory parameter, causing project-scoped sessions
to 404 under newer OpenCode SDK versions. Threaded directory through
SpawnerContext/BackgroundManager so all four call-sites pass it.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
This commit is contained in:
YeonGyu-Kim
2026-04-12 02:30:01 +09:00
parent d8b9bf1aad
commit 3bfa3bd608
9 changed files with 192 additions and 22 deletions
+1
View File
@@ -86,6 +86,7 @@ export async function startTask(
const parentSession = await client.session.get({
path: { id: input.parentSessionID },
query: { directory },
}).catch((err) => {
log(`[background-agent] Failed to get parent session: ${err}`)
return null