Skip to content

The agent that grows with you

docs(agent): say skipped-result content uses str.replace for {name}

kshitijk4poor299a1327b26a
diff --git a/agent/tool_executor.py b/agent/tool_executor.py
index 2595dbf7312..1324a5272bb 100644
--- a/agent/tool_executor.py
+++ b/agent/tool_executor.py
@@ -331,7 +331,8 @@ def _append_skipped_tool_results(
stop_on_flush_failure: bool = True,
) -> bool:
"""Append one ``tool`` result per unstarted call so the assistant tool-call turn never
- lacks matching results (role alternation). ``content`` is formatted with ``{name}``;
+ lacks matching results (role alternation). ``{name}`` in ``content`` is substituted with
+ ``str.replace``, never ``str.format`` (a recorded reason may contain braces);
``hook_error_type`` also emits the terminal ``post_tool_call`` (status=cancelled) per
call with ``hook_id`` overriding the hook's id; ``flush_stage`` flushes after each
append and returns False on the first failed flush when ``stop_on_flush_failure``."""