mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3741] [CLOSED] [GUI] Finish MCP replies after the tool-round limit #4760
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4760
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3741
Author: @i-Vladimir-i
Created: 10/22/2026
Status: ❌ Closed
Base:
main← Head:codex/mcp-limit-final-answer📝 Commits (1)
d41d26d[Codex]: finish MCP replies after the tool-round limit📊 Changes
4 files changed (+109 additions, -14 deletions)
View changed files
📝
docs/DETAILS.md(+5 -3)📝
serve/server.py(+14 -5)📝
serve/test_mcp.py(+89 -5)📝
serve/web/app.js(+1 -1)📄 Description
When the web chat reaches
mcp.max_rounds, the current main can finish tool activity without a final answer.This fix retains the last results and errors, then gives the model one final generation with tools removed.
The default remains eight tool rounds; a round can contain several calls.
The original server, test and UI delta is preserved. The conflict with current main was only in docs/DETAILS.md:
the current main text is retained and only the MCP limit paragraph is updated. No obsolete neighboring sections
are restored. Requests finishing before the limit and ordinary client-owned tools retain their paths.
Tested source: main
4b9e05a2a806a3fe24f7b2560d98626c37dade35plus feature patch SHA256afcf72dc45ab666aba2381f7a5b7edb9dfefbf478dd96f03bf5490ccf440cf32.Published head:
d41d26dd444e05792375a3ffd7dfa936d5cf93dd.Its full tree matches the validated candidate index. Code patch-id
594b16aacde9355db3e84641efc2d51f8731ea44matches the original PR.Passed, Linux/Python3.12, CPU/mock only:
same-day clean main 1020 passed / 15 skipped of 1035, exit 0.
node --check serve/web/app.json both arms andgit diff --check: exit 0.Failed / control: the same six focused methods run against main produce four assertion failures and two passes.
They confirm missing finalization and retained tools. Candidate has no failures. Raw failing logs are retained.
Not run: live model/catalog/browser, Windows and optional SDK/schema/pack tests skipped by the suites.
Native backend builds are not run because no C++ or kernel file changes. Fifteen skips on each arm:
three Anthropic SDK, six pack/tokenizer, three jsonschema and three Windows.
Commands:
python -m unittest serve.test_mcp -v,python -m unittest discover -s serve -p 'test*.py' -v, andnode --check serve/web/app.js.Exact command/exit records and raw logs are retained in the dev work directory. Selected actual output follows.
Focused, MCP and full discovery counts overlap and are not added together.
This is a final model generation, not a server-generated summary. Cancellation, context and output-token limits
remain in the existing request path. Model compliance and answer quality are not established by mock tests.
Selected dev output
main, complete discovery (exit 0):
candidate, complete discovery (exit 0):
Current-head CI and follow-up control
On
d41d26dd444e05792375a3ffd7dfa936d5cf93dd, title and intake checks passed;sweep was skipped. The Linux runtime job
passed installation of the pinned runtime requirements and its fake-engine smoke check,
then failed the full server suite: 1040 tests, 1 failure, 15 skipped, exit 1.
The failing assertion is in
serve.test_responses.NoLeakedSampler.test_server_close_ends_the_sampler:the global count of threads named
(_loop)is 1 rather than the expected 2.serve/test_responses.pyandserve/telemetry.pyare blob-identical to current main.Follow-up on dev, Python 3.12, CPU/mock only: the unchanged test passed 3/3 on clean
main and 3/3 on this published source. A separate synthetic control ends a neighboring
sampler-like thread between the two global counts. It reproduces the exact
1 != 2assertion on both main and this head while the new server's own sampler runs and then
stops correctly on server close. Neither feature source nor the test was edited.
That control establishes a pre-existing weakness of the global-count assertion;
the actual thread interleaving in the Python 3.11 GitHub run was not instrumented,
so it does not prove that this was the precise CI interleaving. The failed CI run
is retained as failed; it was not rerun to obtain a green result.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.