Revised hypothesis
Both visible tool_use failures end with an empty output and no ANSWER line. Likely causes: (1) only calculator is enabled, so modular exponentiation and chained calendar arithmetic have no reliable tool, and the agent may exhaust its 4 tool calls or its 700-token budget; (2) direct strategy with a tight token cap truncates long manual computation before the final line. Enabling date_calc, text_inspect and run_javascript, giving explicit rules for when to use each, and enabling formatRepair should turn these into tool-backed answers. The hidden tool_use families (17-digit arithmetic, modular exponentiation, chained calendar arithmetic with weekdays, letter counts in ~300-character strings) match the visible failures, so the gain should generalize. Uncertainty: I have not verified that truncation or call exhaustion causes the empty outputs. If the cause is a runtime error, the gain will b…
Revised change
Two files change, about 25 lines total, within bounds.
1) entity/config.json:
- tools.enabled = ["calculator","date_calc","text_inspect","run_javascript"]
- tools.maxToolCalls = 6
- model.maxOutputTokens = 1200
- model.temperature = 0.2
- errorRecovery.toolRetries = 1
- errorRecovery.formatRepair = true
- Everything else unchanged: strategy direct, no planner, no self-evaluation, selfConsistencySamples=1, memory settings as they are.
2) entity/system.md (about 1000 chars): keep the two-line identity, then add a protocol:
- Never do long arithmetic, modular exponentiation, date arithmetic or character counting mentally; use a tool.
- Big integers and modular exponentiation: use run_javascript with BigInt. Build values from decimal strings, e.g. BigInt("738"). Implement square-and-multiply, and RETURN the result as a decimal string via .toString(). Never return a raw BigInt, because it is not JSON-serializable. Use calculator for plain exact integer arithmetic.
- Dates: use date_calc. For chained operations, apply one step at a time, feed each result into the next, then call weekday on the final date. Note that subtracting N days is add_days with -N.
- Letter or substring counts and length: use text_inspect on the exact text, copied verbatim. Do not count by eye.
- If a tool errors, fix the input and retry once, or switch to run_javascript.
- Sanity-check the tool result again…