session-flow: remove a delivered absence's away state so idle hook cost returns to the cheap path

Open
#17,389 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@kyle-sexton is already working on this.

Since Nov 19, 2026.

  • #17396 by @kyle-sexton — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python, shell

Research direction

Start with the session-flow away hooks and the deliver and end paths that write the away/<session> state under the plugin data dir. Check whether the Python startup cost only appears once that directory exists. Done means a delivered absence leaves no away/<session> directory (or one within the stated retention), the report stays readable as long as that retention allows, tests cover the cleanup, and the idle hook timing is recorded. Linked PR #17396 is already open, so coordinate there first.

Written by the indexing model from the issue text.

Description

Problem

session-flow's always-registered away hooks cost about 0.02 s per prompt and turn end when no away state exists (Python never starts). Once any away/ directory exists under the plugin data dir, the cost is about 0.09 s. A finished absence's state stays in place, so every later session pays the higher cost.

Done looks like

  • deliver (or end) removes a finished absence's state, or keeps it for a stated bounded retention.
  • After a delivered absence, no away/<session> directory remains (or only within the retention bound).
  • Measured idle hook cost in a session with no active absence is back to about 0.02 s, with the measurement recorded in the PR.
  • Tests cover the cleanup, and the report remains readable after delivery for as long as the retention says.

Refs: #17337

Dominant language
Shell
Stars
22
Forks
2
Avg merge
1h 47m
Merged PRs (30d)
942

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from melodic-software/claude-code-plugins

All issues in melodic-software/claude-code-plugins

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.