disinto/lib
johba ab3efa2402 fix: replace fragile pane grep with Stop hook for idle detection (#272)
## Summary

- Claude Code v2.1.79 permanently shows `❯` in the input area even while actively thinking, causing `monitor_phase_loop` to false-positive on idle detection and kill working sessions after 90 seconds
- Replace `tmux capture-pane | grep ❯` with a Claude Code Stop hook (`lib/hooks/on-idle-stop.sh`) that writes a marker file only when Claude actually finishes responding
- Hook is installed per-worktree in `.claude/settings.json` by `create_agent_session`; marker cleaned up on inject/kill

## Test plan

- [x] Verified hook installs correctly in fresh worktree
- [x] Verified marker file appears only after Claude finishes responding (not during active thinking)
- [x] Verified live dev-agent session picks up fix and Claude works without being killed
- [x] Verified `agent_inject_into_session` clears marker before new work

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/272
2026-03-19 14:57:54 +01:00
..
hooks fix: replace fragile pane grep with Stop hook for idle detection (#272) 2026-03-19 14:57:54 +01:00
agent-session.sh fix: replace fragile pane grep with Stop hook for idle detection (#272) 2026-03-19 14:57:54 +01:00
ci-debug.sh refactor: make all scripts multi-project via env vars 2026-03-14 13:49:09 +01:00
ci-helpers.sh fix: feat: review + dev-poll skip CI gate for non-code PRs (#266) 2026-03-19 13:48:00 +00:00
env.sh fix: codeberg_api_all does not accept a custom token parameter (#198) 2026-03-19 01:25:44 +00:00
load-project.sh feat: per-project Matrix room — load MATRIX_ROOM_ID from project TOML 2026-03-17 08:56:00 +00:00
matrix_listener.service refactor: rebrand dark-factory → disinto (Closes #15) 2026-03-15 17:57:12 +01:00
matrix_listener.sh fix: feat: action-agent — tmux + Claude + formula for operational tasks (#139) 2026-03-19 07:25:25 +00:00
parse-deps.sh refactor: rewrite parse-deps.py as pure bash, remove only Python from repo 2026-03-16 21:22:53 +01:00