Skip to content

feat: support remote Claude Code sessions via BUDDI_HOST env var#7

Open
shadowsaber16 wants to merge 2 commits intotalkvalue:mainfrom
shadowsaber16:feat/remote-ssh-support
Open

feat: support remote Claude Code sessions via BUDDI_HOST env var#7
shadowsaber16 wants to merge 2 commits intotalkvalue:mainfrom
shadowsaber16:feat/remote-ssh-support

Conversation

@shadowsaber16
Copy link
Copy Markdown

@shadowsaber16 shadowsaber16 commented Apr 26, 2026

Adds optional BUDDI_HOST and BUDDI_SOCKET environment variables to buddi-hook.py. When BUDDI_HOST is set (e.g. "localhost:9999"), the hook connects over TCP instead of the Unix socket, enabling Claude Code on a remote VM to forward hook events to Buddi on a local Mac via SSH reverse port-forwarding (typically bridged with socat on the Mac).

Behavior is unchanged when neither variable is set.

Description

Type of change

  • Bug fix
  • New feature
  • Enhancement
  • Documentation
  • Chore (build, CI, refactor)

Checklist

  • I have tested this on a macOS device
  • My code follows the existing style of this project
  • I have updated documentation if needed
  • This PR is focused on a single change

Screenshots

Adds optional BUDDI_HOST and BUDDI_SOCKET environment variables to
buddi-hook.py. When BUDDI_HOST is set (e.g. "localhost:9999"), the hook
connects over TCP instead of the Unix socket, enabling Claude Code on
a remote VM to forward hook events to Buddi on a local Mac via SSH
reverse port-forwarding (typically bridged with socat on the Mac).

Behavior is unchanged when neither variable is set.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shadowsaber16 shadowsaber16 requested a review from grayashh as a code owner April 26, 2026 17:36
@shadowsaber16
Copy link
Copy Markdown
Author

Please feel free to discard the PR and take it up as a feature request to support remote SSH connections for buddi. I realley liked to concept and built this for personal use and felt this could be shared with the community!

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Confidence score: 3/5

  • Unhandled exceptions on invalid BUDDI_HOST port values in buddi/Buddi/Resources/buddi-hook.py could crash the hook and affect user workflows.
  • Score reflects a concrete, user-impacting failure mode with medium severity, but limited to input validation.
  • Pay close attention to buddi/Buddi/Resources/buddi-hook.py - add port validation or error handling to avoid crashes.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="buddi/Buddi/Resources/buddi-hook.py">

<violation number="1" location="buddi/Buddi/Resources/buddi-hook.py:34">
P2: Invalid `BUDDI_HOST` port values can raise uncaught exceptions and crash the hook.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread buddi/Buddi/Resources/buddi-hook.py Outdated
Non-numeric or out-of-range port values would raise ValueError or
OverflowError uncaught by send_event, crashing the hook with a
traceback. Convert both to OSError so the existing handler silently
drops the event the same way other connection failures do.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant