From 673f9df892a1db0cbac8c9f3375096dbac062a2a Mon Sep 17 00:00:00 2001 From: Naveen Chatlapalli Date: Tue, 6 Oct 2026 06:50:49 -0500 Subject: [PATCH 1/2] fix: request concise Harness progress without private reasoning --- .../packages/core/agent_framework/_harness/_agent.py | 7 ++++--- python/packages/core/tests/core/test_harness_agent.py | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/python/packages/core/agent_framework/_harness/_agent.py b/python/packages/core/agent_framework/_harness/_agent.py index fbb9536b90f..e210c171e32 100644 --- a/python/packages/core/agent_framework/_harness/_agent.py +++ b/python/packages/core/agent_framework/_harness/_agent.py @@ -59,9 +59,10 @@ - Think through the task before acting. Break complex work into clear steps. - Use the tools available to you to gather information, perform actions, and verify results. -- Explain your reasoning and thought process as you work through tasks. -- Explain what you learned and what you are going to do next between tool calls, \ -so the user can follow along with your thought process. +- Explain decisions, actions, results, and important trade-offs at a high level. \ +Do not expose private chain-of-thought or hidden reasoning. +- Keep the user informed with concise progress updates between tool calls, \ +summarizing what you learned and what you will do next. - Avoid making more than 4 tool calls in a row without explaining what you are doing. - If a tool call fails or returns unexpected results, adapt your approach rather than \ repeating the same call. diff --git a/python/packages/core/tests/core/test_harness_agent.py b/python/packages/core/tests/core/test_harness_agent.py index ae7ff32020b..3c0105c626c 100644 --- a/python/packages/core/tests/core/test_harness_agent.py +++ b/python/packages/core/tests/core/test_harness_agent.py @@ -94,6 +94,16 @@ def test_create_harness_agent_with_defaults() -> None: assert agent.id is not None +def test_default_harness_instructions_keep_reasoning_private() -> None: + """Default guidance should request useful progress without private reasoning.""" + instructions = _assemble_instructions(None, None) + assert instructions is not None + assert "Explain decisions, actions, results, and important trade-offs at a high level." in instructions + assert "Do not expose private chain-of-thought or hidden reasoning." in instructions + assert "concise progress updates between tool calls" in instructions + assert "thought process" not in instructions + + def test_create_harness_agent_includes_all_default_providers(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: """Default assembly should include history, compaction, todo, mode, and file memory.""" monkeypatch.chdir(tmp_path) From 0e9e7cd3b00f62d0bd06acc36f1aab3b9b27c044 Mon Sep 17 00:00:00 2001 From: Naveen Chatlapalli Date: Tue, 6 Oct 2026 06:55:34 -0500 Subject: [PATCH 2/2] samples: align Python data analysis prompt with Harness privacy guidance --- .../samples/02-agents/harness/harness_data_processing.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python/samples/02-agents/harness/harness_data_processing.py b/python/samples/02-agents/harness/harness_data_processing.py index c62f23dbf49..169dde35a21 100644 --- a/python/samples/02-agents/harness/harness_data_processing.py +++ b/python/samples/02-agents/harness/harness_data_processing.py @@ -74,7 +74,7 @@ ## Working with data - When asked to analyze data, read the relevant files first, then perform the analysis. - Show your analysis clearly with tables, summaries, and key insights. -- When calculations are needed, work through them step by step and show your reasoning. +- When calculations are needed, show the formulas, inputs, and results so the user can verify them. ## Writing output - When asked to produce output files (e.g., reports, summaries, filtered data), use file_access_write to write them. @@ -84,9 +84,10 @@ ## Important - Never modify or delete the original input data files unless explicitly asked to do so. - If asked about data you haven't read yet, read it first before answering. -- Always explain your reasoning and thought process as you work through tasks. -- Always explain what you learned and what you are going to do next between tool calls, so the user can - follow along with your thought process. +- Explain decisions, actions, results, and important trade-offs at a high level. \ +Do not expose private chain-of-thought or hidden reasoning. +- Keep the user informed with concise progress updates between tool calls, \ +summarizing what you learned and what you will do next. """ MAX_CONTEXT_WINDOW_TOKENS = 1_050_000