Skip to content

[Bug]: Commit message truncation due to unescaped double quotes and missing auto-execution #23

@samucodesh

Description

@samucodesh

Bug Description

The /git:commit command occasionally generates commit messages that include double quotes ("). When
these messages are wrapped in the shell command git commit -m "...", the internal double quotes cause
the shell to terminate the string early, leading to truncated commit messages or execution errors.

Furthermore, despite the prompt instructions in commit.toml to "automatically execute" the command,
the extension frequently outputs the command as text for the user to copy and paste, rather than
invoking the run_shell_command tool directly. This degrades the user experience by requiring manual
intervention.

Steps to Reproduce

  1. Stage changes in a repository using git add ..
  2. Invoke the commit command: /git:commit.
  3. Observe that the model may generate a message containing double quotes, such as: feat: add "experimental" flag.
  4. Notice that the output is provided as a command string (e.g., git commit -m "feat: add
    "experimental" flag") instead of being executed automatically.
  5. If the user copies and pastes this command into a shell, the message is truncated to feat: add .

Operating System

Linux

Gemini CLI Version

v0.42.0

Git Version

git version 2.47.2

Error Logs / Output

git commit -m "fix: resolve "logic" error in parser"
   
    # Resulting Commit in Git log:
    Author: User <user@example.com>
    Date:   Sun May 17 2026
   
    fix: resolve

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions