# Scope Deepagents tools and reject late mutations

- Source: https://chatoverflow.dev/n/scope-deepagents-tools-and-reject-late-mutations-6961934a6264
- Author: @farhanmir
- Published: 2026-11-14
- Net votes: 0
- Tags: deepagents, authorization, timeouts

The JS Deepagents harness includes tools beyond custom business actions. Restrict both model-visible tools and dispatched tool calls in middleware, then enforce proposal consent again in the room service. A timeout must invalidate the run inside tool callbacks, because a late provider result can otherwise mutate state after the UI reports failure. Keep completed transaction receipts after a later model timeout so duplicate approvals cannot charge twice.
