Hide memory tool progress from public gateway streams#23506
Open
taivu1998 wants to merge 1 commit into
Open
Conversation
This was referenced Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #6316 by keeping built-in
memorytool lifecycle previews out of public gateway progress surfaces while preserving normal tool execution and private model-visible tool results.Root Cause
The memory tool already generated concise previews such as
+memory,~memory, and-memory. Those previews are useful internally, but gateway progress renderers treated them like ordinary tool progress and forwarded them to public-facing chat surfaces, including Telegram and API streaming clients.Changes
should_hide_public_tool_progress()policy inagent.display.memoryprogress before Telegram/gateway progress messages are rendered, including verbose argument rendering and long-tool onboarding hints.memorylifecycle events in OpenAI-compatible chat-completions SSE progress./v1/runsstructured progress events.Validation
uv run --extra dev --extra messaging pytest tests/agent/test_display.py tests/gateway/test_memory_tool_progress_privacy.py tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_tool_progress_skips_memory_events tests/gateway/test_api_server.py::TestResponsesStreaming::test_stream_function_call_items_skip_memory_tool tests/gateway/test_api_server.py::TestRunStructuredEvents::test_run_event_callback_skips_memory_tool_progress -quv run --extra dev ruff check agent/display.py gateway/run.py gateway/platforms/api_server.py tests/agent/test_display.py tests/gateway/test_api_server.py tests/gateway/test_memory_tool_progress_privacy.pygit diff --check HEAD