fix(start-work): reuse registered opencode agent names
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import { updateSessionAgent } from "../../features/claude-code-session-state"
|
||||
import {
|
||||
resolveRegisteredAgentName,
|
||||
updateSessionAgent,
|
||||
} from "../../features/claude-code-session-state"
|
||||
import {
|
||||
getCompactionAgentConfigCheckpoint,
|
||||
} from "../../shared/compaction-agent-config-checkpoint"
|
||||
@@ -66,6 +69,7 @@ export function createRecoveryLogic(
|
||||
checkpointWithAgent,
|
||||
currentPromptConfig,
|
||||
)
|
||||
const launchAgent = resolveRegisteredAgentName(expectedPromptConfig.agent)
|
||||
const model = expectedPromptConfig.model
|
||||
const tools = expectedPromptConfig.tools
|
||||
|
||||
@@ -81,7 +85,7 @@ export function createRecoveryLogic(
|
||||
path: { id: sessionID },
|
||||
body: {
|
||||
noReply: true,
|
||||
agent: expectedPromptConfig.agent,
|
||||
agent: launchAgent ?? expectedPromptConfig.agent,
|
||||
...(model ? { model } : {}),
|
||||
...(tools ? { tools } : {}),
|
||||
parts: [createInternalAgentTextPart(AGENT_RECOVERY_PROMPT)],
|
||||
|
||||
Reference in New Issue
Block a user