diff --git a/README.md b/README.md index 96f417e..3a4446a 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@
-> **๐Ÿš€ Pullfrog is in beta!** We're onboarding users in waves. [Get on the waitlist โ†’](https://pullfrog.com/join-waitlist) +> **๐Ÿš€ Pullfrog is now generally available!** [Get started โ†’](https://pullfrog.com/console)
diff --git a/agents/postRun.ts b/agents/postRun.ts index c60f0ac..465ee7d 100644 --- a/agents/postRun.ts +++ b/agents/postRun.ts @@ -371,10 +371,16 @@ export async function runPostRunRetryLoop(params: { if (params.canResume && !params.canResume(result)) break; log.info("ยป post-run reflection: nudging agent to update learnings if relevant"); const preReflection = result; + // reflection is a meta-turn for editing the learnings file. it must not + // affect the user-visible `result` output: some models (notably Gemini + // Pro) re-trigger on the initial "call set_output when done" system + // instruction and clobber the task-turn value. snapshot + restore. + const preReflectionOutput = params.ctx.toolState.output; const reflectionResult = await params.resume({ prompt: pendingReflection, previousResult: result, }); + params.ctx.toolState.output = preReflectionOutput; aggregatedUsage = mergeAgentUsage(aggregatedUsage, reflectionResult.usage); pendingReflection = undefined; if (!reflectionResult.success) { diff --git a/toolState.ts b/toolState.ts index 9219f0b..d8ceb02 100644 --- a/toolState.ts +++ b/toolState.ts @@ -170,7 +170,7 @@ export interface ToolState { // the error-path / exit-signal callers from a redundant second PATCH // after the success path already persisted. learningsPersistAttempted?: boolean; - output?: string; + output?: string | undefined; usageEntries: AgentUsage[]; model?: string | undefined; // set by main.ts when the BYOK fallback engaged (configured model needed