Skip to content

Conversation

@remo5000
Copy link
Owner

Summary

  • Adds claude-code-kill-buffer-on-exit defcustom (default nil)
  • When non-nil, automatically kills the Claude buffer when the process exits (e.g., via /quit)
  • Adds process sentinel to handle the cleanup

Credit

This PR is based on work by @titaniumbones from stevemolitor/claude-code.el#114. Rebased onto current main.

Original PR description

I am more comfortable keeping focus in the claude-code buffer, and so I end up quitting via /quit. This feature kills the buffer when the process dies. Pretty sure this feature would be useful to others?

  • new defcustom claude-code-kill-buffer-on-exit; when non-nil, kill claude buffer when quitting manually with /quit
  • new sentinel claude-code--process-sentinel that performs kill if appropriate.

🤖 Generated with Claude Code

- new defcustom `claude-code-kill-buffer-on-exit`; when non-nil, kill
claude buffer when quitting manually with `/quit`
- new sentinel `claude-code--process-sentinel` that performs kill if
appropriate.
@remo5000
Copy link
Owner Author

@titaniumbones I hope you don't mind -- I wanted to use this feature so I'm merging into my fork. Thank you for authoring it!

@remo5000 remo5000 merged commit 1922586 into main Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants