Answer: You modify tool arguments in the onPreToolUse hook by returning a permissionDecision of "allow" along with a modifiedArgs object containing the updated arguments. For example, the code adds a default 30s timeout to shell commands by returning modifiedArgs with timeout set to args.timeout ?? 30000. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments Revision: 3 Digest: sha256:c41fa451751d763f (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:34Z Last changed: 2026-11-18T13:04:17Z (Default timeout comment: — → Default 30s timeout) Last verified: 2026-11-20T13:09:04Z Next check: 2026-11-21T13:09:04Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of Hook name | onPreToolUse | | [1] | 2026-11-20 Return property for modified arguments | modifiedArgs | | [1] | 2026-11-20 Default timeout value | 30000 | milliseconds | [1] | 2026-11-20 Default timeout comment | Default 30s timeout | | [1] | 2026-11-20 Tool name condition | shell | | [1] | 2026-11-20 Sources: [1] GitHub. "Pre-tool use hook - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/hooks/pre-tool-use Role: primary. Accessed: 2026-11-20T13:09:04Z Quote: "onPreToolUse : async (input) =>" (Supports: Hook name) Quote: "permissionDecision : "allow" , modifiedArgs : {" (Supports: Return property for modified arguments) Quote: "timeout : args. timeout ?? 30000" (Supports: Default timeout value) Quote: "// Default 30s timeout" (Supports: Default timeout comment) Quote: "input. toolName === "shell"" (Supports: Tool name condition) Snapshot SHA-256: 86ec40f2f6263877a8523d4b4544894fe1a6b539e2eab71c7c8788c5cb5e57c7 (captured 2026-11-18T13:04:14Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:04:17Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:09:04Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:09:04Z Last attempt: 2026-11-20T13:09:04Z Notes and limitations: Extracted automatically from a single official source (section "Modify tool arguments"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/preinstall-tools-dependencies How do I preinstall tools or dependencies in GitHub Copilot's environment? https://latestn.com/tool/github-copilot/agents-and-automation/prepare-to-govern-agents How do I prepare to govern agents in GitHub Copilot for my enterprise? https://latestn.com/tool/github-copilot/agents-and-automation/process-multiple-files How do I process multiple files with GitHub Copilot CLI in a script? https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-input What input fields does the GitHub Copilot post-tool use hook receive? https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-output What output can a GitHub Copilot post-tool use hook return to modify tool results? https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-hook How do I intercept or modify tool calls before they run using hooks in the GitHub Copilot SDK? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:04:17Z | changed | Default timeout comment: — → Default 30s timeout | [1] 2026-11-18T13:04:17Z | changed | Default timeout value: — → 30000 | [1] 2026-11-18T13:04:17Z | changed | Default timeout: 30000 → — | [1] 2026-11-18T13:04:17Z | changed | Permission decision value: allow → — | [1] 2026-11-17T13:27:13Z | changed | Tool name condition: — → shell | [1] 2026-11-17T13:27:13Z | changed | Permission decision value: — → allow | [1] 2026-11-17T13:27:13Z | changed | Return property for modified arguments: — → modifiedArgs | [1] 2026-11-17T13:27:13Z | changed | Condition: shell → — | [1] 2026-11-17T13:27:13Z | changed | Permission decision: allow → — | [1] 2026-11-17T13:27:13Z | changed | Modification mechanism: modifiedArgs → — | [1] 2026-11-13T03:28:34Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I modify tool arguments in the GitHub Copilot pre-tool use hook? Revision 3, last verified 2026-11-20T13:09:04Z. https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments (accessed 2026-11-21T09:58:21Z). @misc{LatestN_tool_github_copilot_agents_and_automation_pre_tool_use_modify_arguments_r3, title = {How do I modify tool arguments in the GitHub Copilot pre-tool use hook?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments}}, note = {Revision 3; digest sha256:c41fa451751d763f; last verified 2026-11-20T13:09:04Z; accessed 2026-11-21T09:58:21Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments