mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-11 15:13:23 +08:00
Classify tool failures and block identical blind retries in-turn.
Stamp failure_class for schema/timeout/runtime analytics, refuse same tool+args after a failure in the turn, and add a license short-intent recipe for WhatsApp ops. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
4646170743
commit
7373e516f0
5 changed files with 212 additions and 2 deletions
|
|
@ -2300,7 +2300,11 @@ class SqliteStore(ScheduledJobStoreMixin):
|
|||
if raw_cap.isdigit():
|
||||
cap = max(20_000, min(int(raw_cap), 2_000_000))
|
||||
args_capped = self._cap_json_for_log(args, max_chars=cap, keep_keys=())
|
||||
result_capped = self._cap_json_for_log(result, max_chars=cap, keep_keys=("ok", "error_code", "error"))
|
||||
result_capped = self._cap_json_for_log(
|
||||
result,
|
||||
max_chars=cap,
|
||||
keep_keys=("ok", "error_code", "error", "failure_class", "error_class", "hint"),
|
||||
)
|
||||
self._tool_log_queries_repo().insert_tool_log(
|
||||
session_id=str(session_id),
|
||||
tool_name=str(tool_name),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue