Skip to content

First commit message generation hangs after startup #222

@ncaq

Description

@ncaq

Initial commit message generation fails

Problem behavior

When opening a commit message buffer using Magit with the hook to generate commit messages, without having used copilot-chat.el at all since Emacs startup, the generation process enters an indefinite waiting state and the commit message is never generated.
Closing the commit message buffer once and reopening it results in successful generation.

Expected behavior

When attempting to generate a commit message without having used copilot-chat.el since Emacs startup, the message should be generated successfully.

My Emacs configuration

(leaf
 copilot-chat
 :ensure t
 :custom
 (copilot-chat-default-model . "gpt-5")
 (copilot-chat-commit-model . "gpt-4.1")
 (copilot-chat-frontend . 'shell-maker)
 (copilot-chat-markdown-prompt . "日本語で答えてください。")
 :bind
 ("C-; C-;" . copilot-chat-display)
 ("C-; C-a" . copilot-chat-ask-and-insert)
 ("C-; C-b" . copilot-chat-list)
 ("C-; C-c" . copilot-chat-custom-prompt-selection)
 ("C-; C-d" . copilot-chat-doc)
 ("C-; C-e" . copilot-chat-explain)
 ("C-; C-f" . copilot-chat-fix)
 ("C-; C-l" . copilot-chat-add-current-buffer)
 ("C-; C-m" . copilot-chat-set-model)
 ("C-; C-o" . copilot-chat-optimize)
 ("C-; C-q" . copilot-chat-reset)
 ("C-; C-r" . copilot-chat-review)
 ("C-; C-t" . copilot-chat-test)
 ("C-; C-u" . copilot-chat-del-current-buffer)
 ;; Insert GitHub Copilot-generated commit message when starting to edit Git commit message.
 :hook (git-commit-setup-hook . copilot-chat-insert-commit-message))

Notes

This issue did not seem to occur when the commit message generation functionality was initially implemented.
It appears to be a problem that was introduced later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions