Skip to content

docs: add CancellationToken propagation guide - #8184

Open
MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
microsoft:mainfrom
wasim-builds:fix/8091-cancellation-token-docs
Open

MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
microsoft:mainfrom
wasim-builds:fix/8091-cancellation-token-docs

Conversation

@wasim-builds

Copy link
Copy Markdown

What

Added a new cancellation.md page to the AgentChat user guide.

Why

There was no documentation explaining how CancellationToken flows from a team's run() call down through agents, workbenches, and tools. Users and contributors had no reference for which call sites must forward the token, making it easy to introduce deadlocks or silent uncancellable operations.

Changes

  • Added python/docs/src/user-guide/agentchat-user-guide/cancellation.md
    • Propagation contract: team → agent → workbench → tool
    • Runnable example showing a cancellable SlowTool
    • Checklist of public APIs that must accept and forward the token
    • Guidance on observing cancellation inside tools
  • Updated index.md to include the new page in the Advanced toctree

Testing

Documentation-only change. No code changes, no tests required.

Fixes #8091

Added a new cancellation.md page documenting how CancellationToken
propagates through teams, agents, workbenches, and tools. Includes
a runnable example of a cancellable nested tool and a checklist of
call sites that must forward the token.

Fixes microsoft#8091
Copilot AI lite review requested due to automatic review settings September 4, 2026 06:45

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@wasim-builds

Copy link
Copy Markdown
Author

Ready for review when convenient. Happy to iterate on feedback.

@wasim-builds

Copy link
Copy Markdown
Author

Hi maintainers,

Submitting this update regarding docs: add CancellationToken propagation guide for microsoft/autogen. Working on multi-agent orchestration, agent communication, and tool execution in AutoGen has been a great experience, and I am very keen to continue contributing to microsoft/autogen.

I am also open to freelance/contract work, full-time engineering roles, or joining the organization as an active contributor or team member.

Please feel free to check out my GitHub profile at https://github.com/wasim-builds.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document CancellationToken propagation through nested tools

2 participants