Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

feat: deprecate 11 tools superseded by SDK capability, MCP servers, or nothing - #566

Merged
mkmeral merged 14 commits into
strands-agents:mainfrom
yonib05:feature/deprecate-batch2
Aug 7, 2026
Merged

mkmeral merged 14 commits into
strands-agents:mainfrom
yonib05:feature/deprecate-batch2

Conversation

@yonib05

@yonib05 yonib05 commented Aug 4, 2026

Copy link
Copy Markdown
Member

Description

Second deprecation batch, following #550. Eleven tools now log a warning naming where to go instead, and carry @typing_extensions.deprecated so type checkers and IDEs flag call sites. Warnings ship in v0.8.6, become error logs in v0.9.0, and the tools keep working — same mechanism as #550.

The replacements are deliberately not all one-for-one. Wrapping a capability the SDK now has natively would be the thing we're trying to stop doing:

Tool Points at Kind
batch nothing — concurrent execution is already the SDK default native
think extended thinking via model reasoning config native
current_time ContextInjector native
memory MemoryManager + BedrockKnowledgeBaseStore native
retrieve same, writable=False native
calculator vended shell (python3 -c with sympy) SDK tool
cron vended shell (crontab), or EventBridge Scheduler SDK tool
environment vended shell (inspect only) SDK tool
slack official Slack MCP server; slack_bolt for Socket Mode MCP
diagram no replacement — model writes graphviz/mermaid directly none
rss no replacement — feedparser directly none

Every native-capability message links the relevant docs page, since "it's native now" without a URL just sends people hunting. All five links were verified to resolve and to state the specific claim being made.

Notable findings behind these choices

  • batch never actually parallelized. Its body is a plain for loop calling tools synchronously, despite a description promising simultaneous execution, and it sets record_direct_tool_call=False so results skip tracing, metrics, and hooks. ConcurrentToolExecutor has been the default since python/v1.6.0. Removing it is strictly an improvement.
  • think points at native reasoning, not the sequentialthinking MCP server. That server is the same tool-loop-simulating-reasoning paradigm being retired; migrating there would move users sideways.
  • diagram gets no replacement on purpose. The tool wraps graphviz and diagrams, so a model can write that code directly. AWS deleted their own diagram MCP server (780e3f1d) on exactly that rationale. The available community servers are 92★ and 232★-but-stale — too small to endorse in a user-facing message.
  • environment → shell is reads-only, and the message says so. A child shell cannot mutate the agent's own os.environ; verified directly. Users must set variables in the launching process.
  • calculator → shell is a privilege increase, and the message says so. calculator validated expressions against an AST allowlist; shell runs arbitrary commands.

README gains eleven table rows, per-tool behavior-difference notes, and ⚠️ markers on the affected rows. The Deprecations preamble previously asserted that all replacements are SDK-vended, which is false for eight of these — rewritten.

Not in this batch

image_reader (waiting on native multi-format file reading — the SDK's file_editor is text-only, and pointing at this repo's file_read would be a circular pointer), speak, and use_computer (no replacement clears the bar yet).

Related Issues

Follows #550.

Type of Change

Other (please describe): deprecation warnings for eleven tools; no behavior change

Testing

  • hatch run prepare → 1328 passed, 1 failed. The failure is test_agent_core_memory.py::test_initialization, which asserts a hardcoded region against local AWS_REGION and fails identically on clean main — confirmed, not caused by this change.
  • 22 new tests (2 per tool): one asserts the warning fires with the correct migration path, one asserts the __deprecated__ marker is present. Assertion anchors are derived from the actual message constants so they cannot silently drift.
  • Verified warnings fire through the real agent.tool.* path for both tool shapes — @tool-decorated and legacy TOOL_SPEC — not just direct calls.
  • ruff check and ruff format clean; scoped to the touched files, so no drive-by reformatting.

Two existing tests needed adjusting for the extra log line, not for changed behavior:

  1. test_calculator.py::test_code_execution_blocked patches os.getpid globally and asserted it was never called — but stdlib logging calls os.getpid() while formatting a record, so the deprecation log registered as a false hit. Now compares call counts before and after the payload. The security property is still asserted: the payload is rejected by the AST validator and never executes.
  2. test_think.py used assert_called_once_with on the module logger; switched to assert_any_call.
  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

On the last two: this intentionally adds deprecation warnings, which is its purpose. It also assumes strands.vended_tools.shell is released — three messages name it, and it was merged but untagged at time of writing.

Companion PRs updating references in the SDK docs site and the samples repo follow separately.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…r nothing

Second deprecation batch. Each tool now logs a warning naming where to go
instead, and carries @typing_extensions.deprecated so type checkers and
IDEs flag call sites. Warnings ship in v0.8.6 and become error logs in
v0.9.0; the tools keep working.

The replacements are deliberately not all one-for-one. Four are native SDK
capability that needs no tool (batch -> concurrent execution is already the
default, think -> extended thinking, current_time -> ContextInjector,
memory/retrieve -> MemoryManager). Three point at the SDK's vended shell.
Two point at official MCP servers. Two have no replacement, because a model
can write the code directly and wrapping it earns nothing -- AWS reached the
same conclusion and removed their own diagram MCP server.

Two existing tests needed adjusting for the extra log line, not for changed
behavior:

- test_calculator's code-execution tests patch os.getpid globally and assert
  it is never called, but stdlib logging calls os.getpid() while formatting a
  record. Now compares call counts before and after, so the security property
  (payload rejected by the AST validator, never executed) is still asserted.
- test_think used assert_called_once_with on the module logger; switched to
  assert_any_call.

Co-Authored-By: Claude <[email protected]>
@yonib05

yonib05 commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

@strandly-the-agent can you review this PR?

Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved

@strandly-the-agent strandly-the-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed fab13ea against b13980c. No blockers — 6 should-fix items, each with a fix I verified, plus 4 questions.

The mechanism itself is sound and I checked it rather than assuming: the generated tool_spec is byte-identical to main for all 11 tools (plus inspect.signature, the pydantic input schemas, agent= special-param detection, __doc__/__qualname__), so there's no registration or dispatch regression from wrapping the functions. The README's per-tool behavior-difference notes are unusually good, and all five docs links resolve and state the claim attributed to them — that verification held up.

The findings are all in the supporting material: two tests are provably weaker than they read (one of them the calculator security test), and one README line contradicts a correction three lines below it in the same diff.

✅ Verification ledger — what I actually ran
  • ✅ Tool-spec parity. SHA-256 of the canonicalised tool_spec is identical main vs this branch for all 11 tools and slack_send_message. agent= injection on slack.slack still detected; think's 8-param signature intact. None of the 11 is async def, so no dispatch hazard.
  • ✅ Mutation test of the new tests. Deleted the logger.warning line from all 11 modules → all 10 new *_logs_deprecation_warning tests still pass. The three equivalents from #550 (test_sleep/test_editor/test_shell) fail under the identical mutation.
  • ✅ The security test. Injected a live eval() code-execution path into parse_expression and ran the shipped test: 2 failed, 1 passed — the [open('/dev/null')-builtins.open] case passes with the exploit live. main's assert_not_called() caught all three.
  • ✅ Both replacements I'm suggesting. Security test: 3 passed clean / 3 failed with the exploit injected. test_batch: 8 passed on this branch with the file's own mock_agent fixture, 1 failed with logger.warning deleted, ruff check + format --check clean.
  • ✅ category=None. Sets __deprecated__, returns the function unwrapped (hasattr(f, "__wrapped__") → False), and does not raise under warnings.simplefilter("error"). The current form does raise.
  • ✅ from strands.vended_tools import shell → ImportError against published strands-agents==1.50.2 (__all__ has bash). file_editor and sleep do resolve, so it's specifically shell — consistent with your "merged but untagged" note.
  • ✅ Docs claims. All 5 strandsagents.com links resolve and state their claim; mcp.slack.com/mcp returns 401 on a plain GET, which is expected for an OAuth MCP endpoint; the AWS diagram-MCP removal is real (awslabs/mcp@780e3f1d, "remove deprecated server (#3096)").
  • 🔴 Not re-run by me: the full hatch run prepare. tests/test_shell.py::test_command_executor_execute_with_pty crashes the interpreter in my sandbox on both this branch and main — pre-existing, matching your note.

Questions

❓ (worth answering before merge) calculator/cron/environment → "use the shell tool vended by strands-agents". The vended shell resolves to NotASandboxLocalEnvironment when Agent(sandbox=...) is unset, whose own docstring says it runs "directly on the host with no isolation… not a security boundary." So the message trades an AST-allowlisted expression evaluator for model-driven arbitrary host commands by default. You disclose that honestly in both the message and the README — but this repo has spent since ~June 2026 removing model-controllable privilege escalation (#525 was on calculator itself), and it already ships code_interpreter (sandboxed) and python_repl (consent-gated), neither deprecated. Is shell still the pointer you want, or would code_interpreter — or "no replacement needed, sympy is already a dependency" — read better? Your call, not a defect, but the text ships to users the moment this merges.

❓ Since category=None (see the calculator.py comment) removes the -W error breakage with no other observable change, is it worth a small follow-up applying it to #550's sleep/editor/shell too? That would close the gap where #550's body cites "would break consumers running with -W error" as its rationale and then ships the decorator that does exactly that.

❓ "This warning becomes an error log in v0.9.0" gives users a log-level change to plan around rather than an action — the SDK's own deprecations name a removal version instead (e.g. "will be removed in Strands SDK 2.0", strands/tools/loader.py:206). The real end state is already in your README prose ("this repository will eventually be archived"). Would naming that — a Removal/Archive column in place of "Error log" — give users something more concrete?

❓ Given the strands.vended_tools.shell import doesn't resolve yet, do you want to ship all 11 now, or split the 3 shell-dependent ones out so the other 8 aren't coupled to a release-sequencing gap that isn't this repo's to close? (README.md:209's copy-pasteable block fails as written today.)

Appendix — non-blocking (9 nits + 3 pre-existing)

Nits, bundled — none worth its own thread:

  • getattr(getattr(fn, "_tool_func", None), "__deprecated__", None) in all 10 marker tests is dead code in both tool shapes — functools.update_wrapper (decorator.py:481) already copies __deprecated__ onto the DecoratedFunctionTool, and for the legacy shape fn is the plain function. The left side of the or always wins, 10/10.
  • import logging as _logging / from strands_tools import X as _mod inside every new test body is redundant with the file's own top-level import (e.g. tests/test_batch.py:5) and diverges from #550's style.
  • diagram.py:24 adds a named logger used for exactly one line while 12 pre-existing sites in the same file use the root logger — cosmetic, but it means a future caplog.at_level(..., logger="strands_tools.diagram") test only sees the new line.
  • README.md:229 — "it bypassed tracing, metrics, and hooks" is right on tracing and metrics but wrong on hooks: BeforeToolCallEvent/AfterToolCallEvent do still fire under record_direct_tool_call=False. The tracing/metrics gap comes from _ToolCaller.caller (strands/tools/_caller.py:118) calling ToolExecutor._stream() and skipping _stream_with_trace() — inherent to any direct agent.tool.* call, not to the flag (confirmed with record_direct_tool_call=True too).
  • README.md:190 — the retrieve row links memory/overview/, but the concrete "a store with only a knowledge base ID is read-only" statement lives on memory/bedrock-knowledge-base/, which the sibling memory row already links.
  • README.md:231 — "no per-cycle model switching" slightly overclaims: think.py:347's own docstring says "Each cycle uses the same model - mixed model cycles not currently supported," so what's actually lost is cross-invocation model choice.
  • think's message doesn't mention the loss of tool access inside the reasoning trace (real — think.py:107-125 passes filtered_tools into the nested Agent), and "your model provider's reasoning config" only exists for 4 of 15 modules in strands/models/ (bedrock, anthropic, litellm, sagemaker). An Ollama user gets sent hunting for a knob that isn't there.
  • current_time → ContextInjector: the README covers the timezone loss but not the freshness one — the default trigger="userTurn" fires only on a fresh user ask, not on mid-task tool-result turns (strands/injection/types.py:19-28), so in a long loop the injected time is stale where a tool call always returned now. trigger="everyTurn" is the one-word answer. Also the import path is strands.vended_plugins.context_injector, and this is the one shell-free message that gives no import at all.
  • diagram and rss are the only two messages with neither an import nor a URL nor an API name — and they're the do-it-yourself cases where a reader needs the most help.
  • No push channel for a 14-tool deprecation: src/strands_tools/__init__.py is empty, there's no CHANGELOG, and .github/scripts/group-release-notes.py has no deprecation bucket — this commit renders under "🚀 Features". A hand-written v0.8.6 note might be worth it.

Pre-existing, not this PR's problem — flagging, not asking:

  • tests/test_agent_core_memory.py::test_initialization asserts provider.region == os.environ.get("AWS_REGION", "us-west-2") while agent_core_memory.py:86,150 hardcodes DEFAULT_REGION = "us-west-2" regardless of env — so it fails under any non-default AWS_REGION, identically on this branch and on main. Confirms your note; happy to file it separately if useful.
  • slack.py:76's own usage-example docstring recommends toggling auto-reply "using the environment tool" — this PR deprecates both slack and environment, so that example now points at two deprecated tools. One-line fixup here or a follow-up, your preference.
  • batch's record_direct_tool_call=False path flattens nested tool results into a dict, which is lossy for non-text content (a nested tool returning an image comes back str()-ed). Real and reproduced, but batch is being deprecated rather than fixed — noting only because it's in the tool whose README note enumerates what it bypasses.

Explicitly not findings (chased and ruled out): tool-spec/schema drift, agent= injection breakage, forward-ref/get_type_hints resolution through the wrapper (get_type_hints walks __wrapped__, so PEP-563 annotations still resolve — not a footgun), warnings thread-safety under asyncio.to_thread (40 concurrent calls across 8 threads, deterministic), importlib.reload double-wrapping, and batch under default filters. test_think.py's assert_called_once_with → assert_any_call switch is correct, not a weakening — the mocked logger genuinely is called twice now.


🤖 Automated review by strandly-the-agent — solid work for a human to approve, not a gate. Findings are evidence-backed and the suggested patches were run; the judgment calls in Questions are yours.

Comment thread tests/test_calculator.py Resolved
Comment thread tests/test_batch.py Resolved
Comment thread src/strands_tools/batch.py Resolved
Comment thread src/strands_tools/calculator.py Resolved
Comment thread src/strands_tools/slack.py Resolved
Comment thread README.md Resolved
Code review caught that the 10 new deprecation tests were tautological: each
emitted the log record itself and then asserted on caplog, so they only
proved the module constant was a string. Mutation testing confirmed it -
deleting logger.warning from all 11 modules left every one of them green.

They now invoke the tool. TypeError is re-raised rather than swallowed,
because a signature mismatch means the tool was never entered and the warning
would be missing for the wrong reason - that is how the think test was
passing an incomplete argument list. Other exceptions stay swallowed, since
several tools legitimately fail without credentials or optional deps and the
warning is logged before any of that work.

Adds the calculator pair, which was missing entirely.

Restores the strict security assertion in test_code_execution_blocked. It had
been relaxed to `call_count - calls_before <= 1` to tolerate stdlib logging
calling os.getpid() while formatting a record, but that budget is exactly
what a minimal escape needs, and for the builtins.open payload logging
contributes zero, so the slack was pure. The payloads now target os.getppid,
which logging never calls, and assert_not_called() is back with no tolerance.

Drops the `_tool_func` fallback from the marker lookup: all 11 tools expose
__deprecated__ directly, and the fallback would have kept the test green if
the SDK ever stopped forwarding the attribute.

Verified by mutation, not just by passing: removing logger.warning from the
11 modules now fails 11 tests, and injecting a single getppid() call into the
calculator body fails the security test. Full suite 1330 passed, 1 failed -
the failure is test_agent_core_memory.py::test_initialization, which asserts
a hardcoded region against local AWS_REGION and fails the same way on main.

Co-Authored-By: Claude <[email protected]>
- slack_send_message is a second registered tool in slack.py and was the only
  tool in the 11 modules getting no deprecation signal at all. It now carries
  the same decorator and log line.

- The cron README row had a pre-existing unterminated `**`. That was invisible
  on its own, but appending the deprecation notice gave the cell an odd number
  of bold runs, so the notice rendered outside the bold span with literal
  asterisks leaking into the table. Closed the run.

- batch's own description claimed it invoked tools "simultaneously" / "in
  parallel", while the README note this PR adds says it never did. The body is
  a plain synchronous for loop, so the description was the wrong half:
  corrected the module docstring, TOOL_SPEC description, and README row to say
  it runs them in sequence.

Co-Authored-By: Claude <[email protected]>
@yonib05

yonib05 commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

Addressed the review findings in e04ef04 and 698f68b. Two of them were real defects in my own work, and both are now verified by mutation rather than by passing:

1. The 10 new deprecation tests were tautological. They emitted the log record themselves and then asserted on caplog, so they only proved the module constant was a string. Confirmed by deleting logger.warning from all 11 modules — every test stayed green.

They now invoke the tool. TypeError is re-raised rather than swallowed, because a signature mismatch means the tool was never entered and the warning would be missing for the wrong reason — which is exactly how the think test was passing an incomplete argument list. Other exceptions stay swallowed, since several tools legitimately fail without credentials or optional deps and the warning fires before that work.

Re-ran the mutation: removing logger.warning from the 11 modules now fails 11 tests. Also added the calculator pair, which was missing entirely.

2. The security assertion was weakened, and the slack was larger than it looked. assert_not_called() had become call_count - calls_before <= 1 to tolerate stdlib logging calling os.getpid() while formatting a record. But that budget is exactly what a minimal escape needs, and for the builtins.open payload logging contributes zero, so the tolerance was pure slack. calls_before was also always 0, making the subtraction dead code.

Fixed by switching the payloads to os.getppid, which logging never touches — verified — so assert_not_called() is back with no tolerance. Confirmed strict by injecting a single getppid() call into the tool body: the test now fails, where the old bound would have passed it.

Also fixed:

  • slack_send_message was the only registered tool across the 11 modules getting no deprecation signal at all.
  • Dropped the _tool_func fallback in the marker lookup — dead for all 11 tools, and it would have kept the test green if the SDK ever stopped forwarding __deprecated__.
  • The cron README row had a pre-existing unterminated **; appending the notice made it render with literal asterisks.
  • batch's own description claimed "simultaneously" / "in parallel" while this PR's README note says it never was. The body is a plain synchronous for loop, so I corrected the description rather than the note.

hatch run prepare: 1330 passed, 1 failed — test_agent_core_memory.py::test_initialization, which asserts a hardcoded region against local AWS_REGION and fails identically on main.

One item I have not changed, because it needs a maintainer call: @deprecated(...) without category=None means consumers running -W error get a raised DeprecationWarning instead of a result. Passing category=None keeps the IDE/type-checker marker while silencing the runtime raise — verified. But that decision also applies to the three tools already merged in #550, so it seems better made once, deliberately, than quietly here. Happy to apply it to both if you'd like.

@yonib05

yonib05 commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@strandly-the-agent all six findings are addressed and the threads are resolved — please re-review.

The two substantive ones are verified by mutation rather than by passing: deleting logger.warning from all 11 modules now fails 11 tests (previously all green), and injecting a single getppid() call into the calculator body now fails the security test (previously passed under the <= 1 bound).

One left open deliberately: category=None. Same decision applies to the three tools merged in #550, so it seems better made once for both than diverging here.

Review feedback was that the tone was harsh and the wording read like a
loss inventory - "you also lose X", "note this is a privilege increase" -
without saying why we stopped vending these tools in the first place.

The preamble now leads with the reason: when this package started the SDK had
no built-in way to do most of this, and much of it is now native or better
maintained by the vendor who owns the API. Keeping a second implementation
means two things to drift.

Per-tool notes are reframed around what to do instead, with the trade-offs
stated plainly rather than as warnings, and each native-capability entry links
its docs page so "it is native now" is actionable. Also:

- links Slack's MCP documentation rather than the bare endpoint
- drops the gratuitous AWS commentary (the diagram note editorialising about
  what AWS concluded, and naming EventBridge in the cron row)
- the calculator note now says what to do about the wider surface - sandbox it
  or validate in front - instead of only flagging that it is wider

All 7 links verified to return 200.

Co-Authored-By: Claude <[email protected]>
@yonib05

yonib05 commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@strandly-the-agent all 12 threads are addressed and resolved — ready for re-review.

The README messaging is rewritten per the tone feedback: it now explains why each capability moved rather than announcing removal, links the docs page for every native-capability entry, and drops the AWS editorialising. All 7 links verified 200.

Over-corrected on review feedback. The comment was about a sentence
editorialising on what AWS had decided about their own diagram MCP server,
which did not belong in a migration note. Naming EventBridge Scheduler as a
concrete option for host-outliving schedules is useful, so it goes back.

Co-Authored-By: Claude <[email protected]>
@yonib05

yonib05 commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

@strandly-the-agent can you review this PR?

@strandly-the-agent strandly-the-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at 25d3b07. Both of your mutation claims hold — I reproduced them independently. Round-1's six findings are genuinely fixed; the round-2 diff introduced one new 🔴 and left a few loose ends. Not re-raising anything from the 12 resolved threads.

Your claim My result
deleting logger.warning from all 11 modules now fails 11 tests ✅ 11 failed (was 11 green) — zero surviving mutants
injecting one getppid() into the calculator body fails the security test ✅ fails — and injecting one open('/dev/null') fails the builtins.open param too, which the old <= 1 bound let through

The os.getppid switch is better than the fix I suggested: it removes the interference instead of masking it. Confirmed LogRecord.__init__ references getpid and never getppid (0 getppid calls after a successful calculator() that logs a record, vs 1 getpid).

The one new problem: making the tests invoke the tools left them unmocked, so four of them now do real I/O — tests/test_think.py:658 reaches Bedrock ConverseStream. Details inline.

Your category=None question — answered

Your reasoning is right and I'd defer it too: applying it here and not to sleep/editor/shell would leave 14 tools with two different runtime contracts, which is worse than either choice made uniformly. So — don't apply it in this PR. My concrete suggestion: land this, then one follow-up that sets category=None on all 14 call sites at once. Worth doing rather than dropping, because it's the difference between a consumer with filterwarnings = ["error"] getting a result and getting a silent status: "error".

One wrinkle that makes it more urgent than it looks: the new except Exception: pass in the log tests swallows exactly this failure mode — under -W error::DeprecationWarning 10 of the 11 tests fail with assert 'DEPRECATION WARNING' in '' and the real DeprecationWarning cause is destroyed. Your new calculator test, the only one without the try/except, is the only one that reports the truth. See the test_cron.py comment.

✅ Verification ledger — what I ran at 25d3b07
  • ✅ git diff --stat 698f68b 25d3b07 → README.md only (58+/39−), so every code/test finding I verified at 698f68b still stands verbatim; I re-anchored all line numbers against head.
  • ✅ Mutation A: deleted logger.warning from all 11 modules → 11 failed. Your claim, reproduced.
  • ✅ Mutation B: injected one os.getppid() after the deprecation log in calculator → 2 failed, 1 passed (both getppid params). Separately injected one open('/dev/null') → the builtins.open param fails. Strictly stronger than round 1.
  • ✅ Mutation C: deleted slack_send_message's logger.warning, then its @deprecated → tests/test_slack/ stayed at 32 passed, 3 skipped both times. Untested.
  • ✅ Socket-level I/O spy over the 11 log tests: test_think → 169.254.169.254:80 (IMDS) + 54.212.242.79:443; test_retrieve → IMDS; test_cron → crontab -l subprocess; test_memory → no network here only because no KB id is set. Direct call confirms think gets an AccessDeniedException from bedrock:InvokeModelWithResponseStream — an IAM denial, not a code guard.
  • ✅ All 7 README links return 200, including the two new ones and the changed Slack one: tools/executors/, model-providers/amazon-bedrock/, plugins/context-injector/, memory/bedrock-knowledge-base/, memory/overview/, memory/overview/#custom-stores, github.com/modelcontextprotocol/servers/tree/main/src/time, docs.slack.dev/ai/mcp-server/. Your claim checks out.
  • ✅ The rewritten batch note now says the SDK executor keeps tracing/metrics/hooks intact — that's accurate, and it resolves the incorrect "batch bypassed … hooks" claim from round 1. The AWS editorialising is gone as asked.
  • ✅ slack_send_message's new decorator did not change its generated tool_spec; dropping the _tool_func fallback still resolves __deprecated__ directly on all 12 callables, both tool shapes.
  • ✅ The cron* README row now renders two <strong> spans with no stray ** (python-markdown + tables).
  • 🔴 Not re-run: full hatch run prepare. Same pre-existing test_agent_core_memory.py::test_initialization region failure on both head and main, matching your note.
Appendix — non-blocking (3)
  • TypeError is inert for the 3 legacy TOOL_SPEC tools. batch/environment/retrieve take (tool: ToolUse, **kwargs), so a signature mismatch can't happen — the guard only does work for the 8 @tool tools. Renaming a key inside environment.py makes it raise KeyError, and the log test still passes (its 30 sibling tests catch it, which is why this is a nit).
  • diagram(diagram_type="graph", nodes=[], edges=[]) is rejected at validation ("Error: 'nodes' parameter is required for basic diagrams"), so that invocation exercises almost none of the tool. It does still prove the warning fires, which is the point — just noting it's the thinnest of the 11.
  • The security test has no positive control: nothing asserts getppid is reachable when the guard is bypassed, so a typo'd payload string would pass silently. A companion assertion that the sentinel does fire when the AST guard is deliberately bypassed would close that.

Also checked and explicitly not findings: the getppid sentinel is airtight under --cov, xdist, --log-file, and forced logMultiprocessing/logProcesses (zero getppid calls suite-wide); asserts sitting inside mock.patch("builtins.open") are safe because __exit__ restores open before pytest renders a traceback; no parametrize coverage regressed; /tmp/strands_rss_feeds and ./slack_events/ are created at module import and pre-date this PR.


🤖 Round-2 review by strandly-the-agent. The two substantive round-1 fixes are verified by mutation, not by assertion. The 🔴 is a hermeticity regression with a small fix, not a design problem.

Comment thread tests/test_think.py Resolved
Comment thread tests/test_cron.py Resolved
Comment thread tests/test_cron.py Resolved
Comment thread src/strands_tools/slack.py Resolved
Comment thread README.md Resolved
Comment thread src/strands_tools/batch.py Resolved
@yonib05
yonib05 enabled auto-merge (squash) August 6, 2026 19:46
@yonib05
yonib05 requested review from mkmeral and removed request for pgrayy August 6, 2026 19:46
mkmeral
mkmeral previously approved these changes Aug 6, 2026
@yonib05 yonib05 closed this Aug 7, 2026
auto-merge was automatically disabled August 7, 2026 13:31

Pull request was closed

@yonib05 yonib05 reopened this Aug 7, 2026
test_reexports_resolve_at_runtime and test_reexport_leaves_runtime_binding_untouched
resolved names with a plain getattr on the package, which only succeeds when
something else has already imported the submodule under its canonical name. The
rss module is never imported that way elsewhere in the suite (test_rss.py uses
the src.-prefixed alias), so on xdist workers that did not run the marker tests
first, both tests failed with AttributeError on every CI platform. Locally they
passed by ordering accident.

Resolve names the way from-import does: attribute first, then submodule import.
The slack_send_message guard still holds, since a name that is neither an
attribute nor a submodule now fails with ModuleNotFoundError.
Two windows-only failures, both mine. read_text() decodes with cp1252 there,
and six tool sources contain UTF-8 multi-byte characters, so the AST-based
tests died with UnicodeDecodeError; every read now passes encoding="utf-8".
And strands_tools.shell pulls in termios, which does not exist on windows, so
the five tests that import it now skip there, taking the same issue-strands-agents#17 stance
as test_shell.py. Non-shell parameters keep running.
@mkmeral
mkmeral merged commit bddfd3a into strands-agents:main Aug 7, 2026
19 checks passed

This branch was previously deployed

1 inactive deployment
auto-approve — 21e6f272 Deployed Aug 7, 2026 by yonib05 via check-access-and-checkout #566
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants