refactor(agent): trim recovery tail anchor

This commit is contained in:
chengyongru 2026-07-23 17:14:58 +08:00 committed by Xubin Ren
parent df2e5b7225
commit 154cbc1974
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ _MAX_REPEAT_EXTERNAL_LOOKUPS = 2
# Third same-target workspace violation in a turn escalates to "stop retrying".
_MAX_REPEAT_WORKSPACE_VIOLATIONS = 2
_LENGTH_RECOVERY_TAIL_CHARS = 500
_LENGTH_RECOVERY_TAIL_CHARS = 64
EMPTY_FINAL_RESPONSE_MESSAGE = (
"I completed the tool steps but couldn't produce a final answer. "

View File

@ -3,7 +3,7 @@ from nanobot.utils.runtime import build_length_recovery_message
def test_length_recovery_message_anchors_the_existing_tail() -> None:
omitted_prefix = "OMITTED_PREFIX"
tail = "x" * 500
tail = "x" * 64
message = build_length_recovery_message(omitted_prefix + tail)