Repository navigation
Conversation
Hosts replace the tool input with the hook's updatedInput rather than merging it, and every adapter emitted a command-only object. For Claude Bash that dropped run_in_background, timeout, description and dangerouslyDisableSandbox: background launches silently ran in the foreground (auto-backgrounded at 120s, killed at the 30min cap). Rewrite updatedInput as the original tool_input with only the command key replaced, so every other field survives byte-for-byte with its JSON type, including unknown future keys. Applies to the claude, codex, copilot (VS Code), cursor and gemini adapters; copilot CLI already preserved args.
|
@medicm is attempting to deploy a commit to the Pavel Ivanov's projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Fixed
updatedInput, and hosts like Claude Code replace the tool input with it instead of merging — so a rewritten Bash call lostrun_in_background,timeout,descriptionanddangerouslyDisableSandbox. In practice every background launch ran in the foreground (auto-backgrounded at 120s, killed at the 30min cap).Added
toolInputWithCommandhelper: buildsupdatedInputfrom the ORIGINALtool_inputobject with onlycommandreplaced; every other key survives byte-for-byte with its JSON type, including unknown future keys.run_in_background/timeout/description/dangerouslyDisableSandbox/unknown-key preservation and the no-rewrite passthrough (claude), plus preservation tests for codex, copilot VS Code, cursor and gemini.Removed
claudeUpdatedInput/codexUpdatedInput/copilotUpdatedInput/cursorUpdatedInput/geminiUpdatedInputstructs.Verification:
just check(fmt/vet/staticcheck/test/race/verify, 420 filter conformance tests) all pass; pipe testecho '{"tool_name":"Bash","tool_input":{"command":"... | tail -15","run_in_background":true,"timeout":5400000,"description":"d"}}' | ctx-wire hook claudenow returns all fields inupdatedInput.