Skip to content

Commit 18ea7af

Browse files
committed
fix(streaming): drop raw tool args from WARNING log
Logging raw_args[:200] could leak partial file contents, PII, or secrets from write_file / apply_patch arguments into production log pipelines. Switch to logging only bounded metadata (tool name + raw arg byte count). The existing malformed-args test still passes since it asserts on the "Failed to parse tool call arguments" prefix, which is preserved.
1 parent 8a0994b commit 18ea7af

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/agentex/lib/core/temporal/plugins/openai_agents/models/temporal_streaming_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,8 @@ async def get_response(
874874
parsed_args = json.loads(raw_args) if raw_args else {}
875875
except json.JSONDecodeError:
876876
logger.warning(
877-
f"Failed to parse tool call arguments for {call_data['name']}: {raw_args[:200]}"
877+
f"Failed to parse tool call arguments for {call_data['name']} "
878+
f"(raw_args_bytes={len(raw_args)})"
878879
)
879880
parsed_args = {}
880881
try:

0 commit comments

Comments
 (0)