Skip to content

Warn in the input status when Pi stops producing output - #299

Open
dnouri wants to merge 2 commits into
masterfrom
issue-253-session-watchdog
Open

Warn in the input status when Pi stops producing output#299
dnouri wants to merge 2 commits into
masterfrom
issue-253-session-watchdog

Conversation

@dnouri

@dnouri dnouri commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Warn in the existing input-header status after five minutes of stdout silence while streaming or compacting. Keep the current phase visible, use the warning face, and provide help for manual abort.

Configure pilish-session-inactivity-timeout with positive seconds, or nil to disable it. Any nonempty stdout resets the quiet interval. Tools and subagents may still be working; the warning never polls the backend, aborts work, or changes session lifecycle state.

Simplify timer ownership and cancel abandoned observers when chat buffers lose their local state or are killed. Keep monitoring limited to active sessions. Replace the simulated test scheduler with real timers and focused allocation checks, preserving coverage for duplicate observers and timer churn.

Validated with 1,784 passing unit tests (one existing skip), fake RPC integration, tool-update correctness smoke, and real-process input-header smoke covering silence, recovery, abort, concurrent sessions, session transitions, and abandoned-timer cleanup. Independent mutation checks cover timer cadence, rendering errors, protocol literals, and allocation behavior.

Fixes #253.

Warn in the existing input-header status after five minutes of stdout silence while streaming or compacting. Keep the current phase visible, use the warning face, and provide help for manual abort.

Add `pilish-session-inactivity-timeout` (positive seconds; nil disables). Any nonempty stdout resets the quiet interval. Tools and subagents may still be working; this is only an advisory warning, with no backend polling, automatic abort, or lifecycle changes.

Validated with 1,780 passing unit tests (one existing skip), fake RPC integration, tool-update correctness smoke, and real-process input-header smoke covering silence, recovery, abort, concurrent sessions, and session transitions.

Fixes #253.
Warn in the existing input-header status after five minutes of stdout silence while streaming or compacting. Keep the current phase visible, use the warning face, and provide help for manual abort.

Configure `pilish-session-inactivity-timeout` with positive seconds, or nil to disable it. Any nonempty stdout resets the quiet interval. Tools and subagents may still be working; the warning never polls the backend, aborts work, or changes session lifecycle state.

Simplify timer ownership and cancel abandoned observers when chat buffers lose their local state or are killed. Keep monitoring limited to active sessions. Replace the simulated test scheduler with real timers and focused allocation checks, preserving coverage for duplicate observers and timer churn.

Validated with 1,784 passing unit tests (one existing skip), fake RPC integration, tool-update correctness smoke, and real-process input-header smoke covering silence, recovery, abort, concurrent sessions, session transitions, and abandoned-timer cleanup. Independent mutation checks cover timer cadence, rendering errors, protocol literals, and allocation behavior.

Fixes #253.
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.

Add local watchdog for sessions stuck in streaming/compacting (no signal when pi wedges a turn)

1 participant