Skip to content

Commit dca6ff1

Browse files
blazejpawlakclaude
andcommitted
fix(replay): preserve agent on fallback prompt replay
Pass `agent` in the session.prompt body so the fallback model runs with the same agent as the original request. Without this, OpenCode defaults to its built-in plan agent (read-only mode), causing the fallback model to refuse tool execution. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eebff47 commit dca6ff1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/replay/orchestrator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ export async function attemptFallback(
214214
path: { id: sessionId },
215215
body: {
216216
model: { providerID, modelID },
217+
agent: agentName ?? undefined,
217218
parts: promptParts as NonNullable<
218219
Parameters<typeof client.session.prompt>[0]["body"]
219220
>["parts"],

0 commit comments

Comments
 (0)