Skip to content

feat: add remote SSH monitoring for Claude Code and Codex sessions - #42

Closed
Hatiaa wants to merge 1 commit into
wxtsky:mainfrom
Hatiaa:feature/remote-ssh-monitoring
Closed

Hatiaa wants to merge 1 commit into
wxtsky:mainfrom
Hatiaa:feature/remote-ssh-monitoring

Conversation

@Hatiaa

@Hatiaa Hatiaa commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

改动说明

这个 PR 为 CodeIsland 增加了远程 SSH 会话监控能力,当前暂时支持 Claude Code 和 Codex。

用户可以在设置页添加远程主机,建立 SSH 连接后,远端会话会和本机会话一起显示在现有 UI 中。

实现方式

实现思路是:

  1. 本地继续复用现有的 HookServer
  2. 通过 SSH 建立远程 socket 转发
  3. 在远端上传并安装一个轻量 hook helper
  4. 让远端 Claude Code / Codex 的 hook 事件通过 SSH 回传到本地
  5. 在现有 session 流程里把远端会话当作带 remote 标记的 session 处理

这样不需要单独做一套远程轮询或单独的远程 UI 逻辑。

主要改动

  • 新增远程主机管理与 SSH 转发逻辑
  • 新增远端 hook 安装器和远端 helper 脚本
  • 在设置页增加 Remote 页面
  • 在 session 模型和 UI 中增加 remote 会话标记
  • 远端断开时自动清理对应 session

说明

这次只做了远程 Claude Code / Codex 支持,没有扩展到其他 agent 工具(因为我只装了这两个)。

nguyenvanduocit pushed a commit to nguyenvanduocit/CodeIsland that referenced this pull request Apr 9, 2026
Scouted wxtsky/CodeIsland v1.0.10–v1.0.16 and vibeislandapp/vibe-island
(April 7–9 2026). Added 5 kanban tasks for actionable v1.0.16 changes:

- T-011: Warp terminal misdetection fix (bundle ID over TERM_PROGRAM)
- T-012: Stuck session auto-reset + hook exec PID fix
- T-013: Ghostty+tmux tab focus fix (PR wxtsky#43)
- T-014: Menu bar icon when panel is auto-hidden (PR wxtsky#39)
- T-015: Clickable session card to jump to terminal (wxtsky#37)

Updated CLAUDE.md scouted-but-unsynced notes. Skipped: CI/DMG build
fixes (v1.0.10–15), notarization/signing, Copilot CLI, open PR wxtsky#42 (SSH).

https://claude.ai/code/session_01XNkMdQ4G4cwFZHX1TdNFM9
@Hatiaa

Hatiaa commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

发现个小问题,断连之后不会自动尝试重连,作者大大可以考虑加上这个功能

@wxtsky

wxtsky commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Great work on this! The architecture is clean — reusing HookServer via SSH tunnel is a smart approach. Remote session guards are thorough.

A couple of things to address:

  1. Missing reinstall L10n key — SettingsView.swift references l10n["reinstall"] but neither EN nor ZH dictionaries define it. This will show the raw key text in the UI.

  2. No tests — For 1000+ lines of new code, at least basic unit tests for session ID namespacing (remote:<hostId>:<sessionId>) and remote guards would be good.

Merging now and will fix the L10n issue + add improvements on our side. Thanks for the contribution!

@wxtsky wxtsky mentioned this pull request Apr 11, 2026
@wxtsky

wxtsky commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Merged manually in commit abfc3b7. Thanks @Hatiaa for the great contribution! 🎉

@wxtsky wxtsky closed this Apr 11, 2026
wxtsky added a commit that referenced this pull request Apr 11, 2026
…+ completion queue fix

Multi-question (merged #59 + #60):
- Wizard-style one-question-at-a-time UI with Back navigation
- MultiSelect checkbox support and "Other" free-text input
- AskUserQuestionState with answer key dedup (header-based, collision-safe)
- answerQuestionMulti with positional matching
- drainQuestions sends deny for AskUserQuestion-derived requests
- 7 unit tests covering multi-question, dedup, skip, disconnect

Completion queue fix (merged #61):
- Queue completion notifications when approval/question card is active
- Drain queued completions in showNextPending

Remote SSH monitoring (merged #42):
- SSH tunnel forwarding for remote Claude Code / Codex sessions
- Remote hook installer and Python bridge script
- Settings UI for remote host management
- Remote session guards (skip PID monitor, model read, persistence, terminal activation)

Co-Authored-By: CodePirate7 <[email protected]>
Co-Authored-By: lkangd <[email protected]>
Co-Authored-By: Hatiaa <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
heiboy0070 pushed a commit to heiboy0070/CodeIsland that referenced this pull request Apr 13, 2026
…+ completion queue fix

Multi-question (merged wxtsky#59 + wxtsky#60):
- Wizard-style one-question-at-a-time UI with Back navigation
- MultiSelect checkbox support and "Other" free-text input
- AskUserQuestionState with answer key dedup (header-based, collision-safe)
- answerQuestionMulti with positional matching
- drainQuestions sends deny for AskUserQuestion-derived requests
- 7 unit tests covering multi-question, dedup, skip, disconnect

Completion queue fix (merged wxtsky#61):
- Queue completion notifications when approval/question card is active
- Drain queued completions in showNextPending

Remote SSH monitoring (merged wxtsky#42):
- SSH tunnel forwarding for remote Claude Code / Codex sessions
- Remote hook installer and Python bridge script
- Settings UI for remote host management
- Remote session guards (skip PID monitor, model read, persistence, terminal activation)

Co-Authored-By: CodePirate7 <[email protected]>
Co-Authored-By: lkangd <[email protected]>
Co-Authored-By: Hatiaa <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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.

2 participants