Skip to content

issue ? : with mulitple instances in a dir, use current claude instance instead of prompting #132

@rollandsantimano

Description

@rollandsantimano

I'm not sure if this is a bug ...

From the README:
"Commands that operate on an instance (claude-send-command, claude-code-switch-to-buffer, claude-code-kill, etc.) will prompt you for the Claude instance if there is more than one instance associated with the current buffer's project."

When already in a eat/vterm buffer with a claude instance, some commands, eg. toggling read-only mode, should use that instance without prompting. If there are strong reasons to retain the current behavior, maybe consider a variable to override it ?

I use this workaround right now:

(define-advice claude-code--get-or-prompt-for-buffer (:around (orig-fn) use-current)
    "If already in a claude buffer, use it directly."
    (if (claude-code--buffer-p (current-buffer))
        (current-buffer)
      (funcall orig-fn)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions