Skip to content

github copilot (v1.0.24) now support modifiedArgs #1839

Closed

Description

@paolomainardi

🤖 This was written by an AI agent on behalf of @paolomainardi.

Summary

Since Copilot CLI v1.0.24 (April 10, 2026), preToolUse hooks support modifiedArgs for transparent command rewriting — the same capability Claude Code has had via updatedInput. The official docs now list modifiedArgs as a supported output field.

However, rtk hook copilot (tested on RTK 0.39.0) is a complete no-op: it returns empty stdout + exit 0 for every command, regardless of whether a rewrite exists.

Reproduction

# Claude hook — works (transparent rewrite)
echo '{"tool_name":"bash","tool_input":{"command":"git status"}}' | rtk hook claude
# → {"hookSpecificOutput":{"hookEventName":"PreToolUse",...,"updatedInput":{"command":"rtk git status"}}}

# Copilot hook — no-op (empty output, exit 0)
echo '{"toolName":"terminal","toolInput":{"command":"git status"}}' | rtk hook copilot
# → (nothing)

# But the rewrite engine knows what to do:
rtk hook check --agent copilot git status
# → rtk git status

Expected behavior

rtk hook copilot should output modifiedArgs in the Copilot CLI format:

{"modifiedArgs":{"command":"rtk git status"}}

This would make the Copilot hook functionally equivalent to the Claude Code hook, enabling transparent rewrite instead of the current no-op behavior.

Context

Environment

  • RTK: 0.39.0
  • Copilot CLI: tested against v1.0.44 docs (installed version 0.0.405)
  • OS: Linux (Arch)

Activity

  1. changed the title [-]rtk hook copilot is a no-op — does not output modifiedArgs despite Copilot CLI v1.0.24+ support[/-] [+]github copilot (v1.0.24) now support modifiedArgs[/+] on May 11, 2026
  2. added 2 commits that reference this issue on May 14, 2026
    3564cf8
    c8949c2
  3. added
    bug
    help wanted
    on May 27, 2026
  4. pszymkowiak commented on May 27, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟠 Priority high
    🎯 Confidence 88%

    Summary

    rtk hook copilot is a no-op (empty stdout, exit 0) instead of emitting modifiedArgs as supported by Copilot CLI v1.0.24+; fix should output the rewrite in Copilot's format and respect exclude_commands.

    📁 Relevant files
    • src/hooks/copilot.rs
    • src/hooks/mod.rs

    Triaged automatically by wshm · This is an automated analysis, not a human review.

  5. added a commit that references this issue on May 28, 2026
    6561990
  6. aeppling commented on Jun 8, 2026

    @aeppling
    Contributor

    Hey, should be solved on 0.42.3 since the Copilot CLI update

  7. added
    resolved-pending-close
    on Jun 8, 2026
  8. added a commit that references this issue on Jun 8, 2026
    b4baa68
  9. daleksandrov-qontigo commented on Jun 12, 2026

    @daleksandrov-qontigo

    It seems like is doesn't work for 0.42.3

    $ rtk --version
    rtk 0.42.3
    
    $ echo '{"toolName":"terminal","toolInput":{"command":"git status"}}' | rtk hook copilot
    
    $ rtk hook check --agent copilot git status
    rtk git status
    
  10. KuSh commented on Sep 5, 2026

    @KuSh
    Collaborator

    This looks resolved on the current code (commit 4b0bbf2, v0.42.x), but it could not be fully reproduced here. Marking it resolved-pending-close: it will be closed in a while unless someone reports it still happening on the latest version.

  11. KuSh commented on Sep 13, 2026

    @KuSh
    Collaborator

    This has carried the resolved-pending-close label with no new report of it happening, so closing it. The Copilot hook now emits modifiedArgs for transparent rewriting; it landed in 4b0bbf2 and shipped in v0.42.3. The reason the reproduction in this thread stayed empty is the test payload: Copilot CLI sends toolName plus toolArgs as a JSON-encoded string, so echo '{"toolName":"bash","toolArgs":"{\"command\":\"git status\"}"}' | rtk hook copilot returns {"modifiedArgs":{"command":"rtk git status"}} on the current version. Please comment or reopen if rewriting still does not happen for you with a real Copilot CLI session on the latest release.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clibughelp wantedpriority:highresolved-pending-close

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions