Skip to content

Added hang detection: kill process when no PTY output received within timeout - #11

Merged
oleg68 merged 1 commit into
nbplugins:mainfrom
oleg68:feature/hang-handler
Apr 11, 2026
Merged

oleg68 merged 1 commit into
nbplugins:mainfrom
oleg68:feature/hang-handler

Conversation

@oleg68

@oleg68 oleg68 commented Apr 11, 2026

Copy link
Copy Markdown
Collaborator

Watchdog fires in the existing 500 ms pollScreenState() timer: if no PTY bytes arrive within the configured timeout after launch, the process is stopped and the error panel is shown with the elapsed-time message.

  • ClaudeCodePreferences: KEY_HANG_TIMEOUT_SECONDS (default 60, 0=disabled)
  • ClaudeCodeOptionsPanel: hang timeout spinner on General tab (0–3600 s)
  • ClaudeSessionController: processStartedAt / firstOutputReceived fields, hang check in pollScreenState(), handleHang() + setHangCallback()
  • ClaudeSessionTab: wires controller.setHangCallback(this::showStartError)
  • ClaudeSessionControllerTest: 4 new tests for hang-detection logic

… timeout

Watchdog fires in the existing 500 ms pollScreenState() timer: if no PTY
bytes arrive within the configured timeout after launch, the process is
stopped and the error panel is shown with the elapsed-time message.

- ClaudeCodePreferences: KEY_HANG_TIMEOUT_SECONDS (default 60, 0=disabled)
- ClaudeCodeOptionsPanel: hang timeout spinner on General tab (0–3600 s)
- ClaudeSessionController: processStartedAt / firstOutputReceived fields,
  hang check in pollScreenState(), handleHang() + setHangCallback()
- ClaudeSessionTab: wires controller.setHangCallback(this::showStartError)
- ClaudeSessionControllerTest: 4 new tests for hang-detection logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68
oleg68 merged commit f2a4f6d into nbplugins:main Apr 11, 2026
3 checks passed
@oleg68
oleg68 deleted the feature/hang-handler branch April 11, 2026 16:34
oleg68 added a commit to oleg68/NetbeansPluginClaudeCodeGui that referenced this pull request Apr 13, 2026
… timeout (nbplugins#11)

Watchdog fires in the existing 500 ms pollScreenState() timer: if no PTY
bytes arrive within the configured timeout after launch, the process is
stopped and the error panel is shown with the elapsed-time message.

- ClaudeCodePreferences: KEY_HANG_TIMEOUT_SECONDS (default 60,
0=disabled)
- ClaudeCodeOptionsPanel: hang timeout spinner on General tab (0–3600 s)
- ClaudeSessionController: processStartedAt / firstOutputReceived
fields, hang check in pollScreenState(), handleHang() +
setHangCallback()
- ClaudeSessionTab: wires
controller.setHangCallback(this::showStartError)
- ClaudeSessionControllerTest: 4 new tests for hang-detection logic

Co-authored-by: Oleg Samarin <osamarin@openintegration.inc>
Co-authored-by: Claude Sonnet 4.6 <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