GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(contrib): isolate tracked raw tool payloads by ningyixi · Pull Request #176 · agentclientprotocol/python-sdk

Conversation

@ningyixi

@ningyixi ningyixi commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Summary

ToolCallTracker retains references to nested raw_input and raw_output values. Mutating arguments after start()/progress(), or editing a returned notification/view, silently changes the tracked state. tool_call_model() documents a deep copy but shares those raw values too: a PermissionBroker requester that normalizes its request can alter the tracker's data.

Copy raw payloads on ingress and at each export boundary, matching the existing content/location ownership policy and SessionAccumulator's raw-payload handling. Start/progress notifications, views, and permission models each have detached nested data. Explicit None clearing and scalar/list JSON values retain their behavior. The public tracker docstring documents ownership.

Validation

  • Base 11f8a4c, with the new tests: 13 failed, 15 passed in tracker/permission tests. Every ingress/export path shares mutable raw data before this change, including the public PermissionBroker flow.
  • After: 37 contrib tests passed. Coverage includes both raw fields, start/progress ingress, four export paths, permission-request mutation, scalar/list values, and explicit clearing.
  • make check: passed (lockfile, all pre-commit hooks, Ruff, ty, deptry).
  • make test: 468 passed, 1 skipped (optional Gemini CLI test).
  • git diff --check: passed.

Tests use public tracker/broker APIs and a local requester callback. No model calls, external services, schema generation, API signatures, or dependency changes.

AI assistance disclosure: Codex prepared the patch, tests, and description and ran the checks above. No human code review is claimed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ningyixi
fix(contrib): isolate tracked raw tool payloads
fb74a7f
frostming
frostming reviewed Nov 9, 2026
View reviewed changes
Comment thread src/acp/contrib/tool_calls.py
Comment on lines +90 to +91
self.raw_input = deepcopy(raw_input)
self.raw_output = deepcopy(raw_output)

@frostming frostming Nov 9, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

IMO only keeping these two lines is enough, in other occurrences they are either not harmful or rarely touched.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@frostming frostming frostming left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ningyixi @frostming
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.