feat: correlate managed tool calls by external ID - #773
Draft
bbednarski9 wants to merge 1 commit into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
bbednarski9
force-pushed
the
feat/managed-tool-call-id-446
branch
from
August 12, 2026 23:58
027f364 to
5bf9fbd
Compare
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.
Overview
This adds the missing external tool-call correlation ID to managed tool execution across Rust, Python, Node.js, C FFI, and Go. A provider, harness, or transport can now supply one stable ID at the managed execution boundary, and Relay places that ID on the matching tool start and end events across success, callback error, and cancellation.
This is the final runtime gap in the tool-provenance direction described by #446:
The code is independently mergeable on
main; complete closure of the broader #446 contract assumes #575 also lands. Relay continues to expose transport-neutral primitives rather than owning MCP transport or adding a protocol-specific proxy.Details
tool_call_id/toolCallIdsupport to managed execution in Rust, Python, and Node.js, including typed wrappers.category_profiledata.ToolCallRequest.tool_call["id"]; the Deep Agents integration inherits the same behavior.nemo_relay_tool_call_execute_v2(..., tool_call_id, out)instead of changing the legacy signature.WithToolCallIDoption apply toToolCallExecuteas well as manual lifecycle calls.Validation completed:
cargo test --workspace --all-features --no-fail-fast -- --test-threads=1cargo clippy --workspace --all-targets --all-features -- -D warningscargo fmt --all -- --checkty, docs links, FFI header sync, Cargo checks, Go formatting/vet, and Node formatting/docstrings. The unrelated Python worker protobuf hook was skipped becausejustis unavailable; this PR does not change worker protobufs.git diff --checkWhere should the reviewer start?
Start with
crates/core/src/api/tool.rsand the managed lifecycle regressions incrates/core/tests/integration/middleware_tests.rs. They show the central behavior for success, failure, cancellation, omission, and guardrail rejection.Then review
crates/ffi/src/api/tool_lifecycle.rswithcrates/ffi/nemo_relay.hfor the additive C ABI decision, andpython/nemo_relay/integrations/langchain/middleware.pyfor framework ID forwarding. The application/protocol responsibility boundary is documented indocs/integrate-into-frameworks/wrap-tool-calls.mdx.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)