Skip to content

The SessionStart hook should say how long it took, so a slow host is distinguishable from a slow plugin #706

Closed

Description

@fdaviddpt

From @jqit-ricky's #660 investigation, and the single sharpest piece of feedback on that thread:

A "hook took N s" line at start would have pointed us at the host a day earlier.

They spent days measuring this plugin. The cause turned out to be their own machine — 129h uptime and a 23.2GB kernel paged-pool leak, which made every fork cost 90-263ms instead of 10-30ms. The plugin cannot diagnose that, and should not try. But a hook that states its own runtime is how a user finds out the question is not about the plugin at all.

What to add

A single line from the SessionStart hook naming its own wall-clock duration. The design questions worth settling in the issue rather than in review:

  • Always, or over a threshold? A line on every start is noise on a healthy host; a line only over (say) 5s is silent exactly when someone is comparing two machines. A cheap answer: always emit it into the daily log, surface it in the session only over a threshold.
  • Where does it go? The session-start output is context the user pays for on every turn. hook-errors.log is wrong (this is not an error); the daily log is right for the record, and /remember:doctor is right for the read-out.
  • What does it cost? Whatever this is, it cannot add a fork to the path it measures (SessionStart hook averages ~12.5s on Windows (Git Bash) — measured over 36 session starts on v0.29.1 #660).

An honest number the user can see beats a fast hook they cannot measure — and this repo's own stated value is that anything that can be absent should say it is. A duration nobody can read is the same silence in a different place.

[AI-generated]

Activity

  1. added
    enhancement
    priority:medium
    lane-diagnostics
    on Sep 16, 2026
  2. self-assigned this
    on Sep 16, 2026
  3. added 3 commits that reference this issue on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementlane-diagnosticspriority:medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions