@blockrun/franklin 3.16.0 → 3.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/agent/loop.js +10 -4
  2. package/package.json +1 -1
@@ -802,7 +802,7 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
802
802
  let turnToolCalls = 0; // Total tool calls this user turn
803
803
  const turnToolCounts = new Map(); // Per-tool-name counts this turn
804
804
  const readFileCache = new Set(); // Files already read (dedup)
805
- const MAX_TOOL_CALLS_PER_TURN = 25; // Hard cap per user turn
805
+ const MAX_TOOL_CALLS_PER_TURN = 40; // Soft cap — model gets a stop nudge but can finish. Raised from 25 (3.16.2): real exploratory work routinely needs 25-35 distinct calls, and the soft cap was firing on legit sessions multiple times per day.
806
806
  // Hard break threshold for runaways. The cap above is soft — we
807
807
  // inject a "limit reached" tool_result once and let the model
808
808
  // close out. If it ignores that signal and keeps calling tools,
@@ -818,9 +818,15 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
818
818
  // running data-engineering on GCS logs: 15 distinct gsutil/bq calls,
819
819
  // each producing new insights, would have been cut off at call 6.
820
820
  // 3.15.30 detects ACTUAL loops by tracking the (tool, input)
821
- // signature: only break when the model calls the SAME signature 3
822
- // times in one turn. Different inputs → exploration, allowed.
823
- const SAME_SIGNATURE_HARD_STOP = 3;
821
+ // signature: only break when the model calls the SAME signature
822
+ // repeatedly in one turn. Different inputs → exploration, allowed.
823
+ //
824
+ // 3.16.1 bumps the threshold 3 → 5. The "3" rule was killing real
825
+ // sessions at 25-40 productive distinct calls when the model
826
+ // legitimately re-ran the same Read/Bash twice for polling or
827
+ // verification. Real infinite loops still trigger well before
828
+ // HARD_TOOL_CAP (50) bails out as a safety net.
829
+ const SAME_SIGNATURE_HARD_STOP = 5;
824
830
  // Tracks which tool names have already had a warn injected this turn.
825
831
  // Without it, every call past threshold pushes another [SYSTEM] STOP
826
832
  // tool_result into the model's context — same shape bug as the cap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/franklin",
3
- "version": "3.16.0",
3
+ "version": "3.16.2",
4
4
  "description": "Franklin Agent — The AI agent with a wallet. Spends USDC autonomously to get real work done. Pay per action, no subscriptions.",
5
5
  "type": "module",
6
6
  "exports": {