Skip to content

Work Sessions

Work sessions reveal how developers work — not just what they produce. By grouping commits into sessions, ShipLens identifies deep work periods, micro-tasking patterns, and overall coding rhythm.

How Sessions Are Detected

Consecutive commits from the same contributor are grouped into sessions based on time gaps:

gap threshold=45 minutes

If two consecutive commits are separated by ≤ 45 minutes, they belong to the same session. A gap longer than 45 minutes starts a new session.

Session Classification

Sessions are classified by their duration:

ClassDurationDescription
Deep≥ 50 minutesExtended focused work — architecture, complex features, debugging
Medium20–49 minutesModerate focus — feature work, code review, targeted fixes
Micro< 20 minutesQuick touches — typo fixes, config changes, small patches

Metrics

For each contributor over a date range, the session analysis produces:

MetricDescription
total_sessionsTotal number of detected sessions
deepCount of deep sessions (≥ 50 min)
mediumCount of medium sessions (20–49 min)
microCount of micro sessions (< 20 min)
total_active_minutesSum of all session durations
avg_session_minutesAverage session duration
longest_session_minutesDuration of the longest session
commits_per_sessionAverage commits per session

What Sessions Tell You

High Deep Session Ratio

A contributor with many deep sessions is getting extended periods of focused work. This generally correlates with:

  • Complex feature development
  • Effective meeting/interrupt management
  • Strong time-blocking habits

High Micro Session Ratio

A contributor with mostly micro sessions might be:

  • Context-switching frequently
  • Doing primarily maintenance/ops work
  • Interrupted often (meeting-heavy schedule)
  • Handling quick hotfixes across multiple projects

Changes in session patterns over time can signal:

  • Deepening sessions — Developer is getting more focused time (positive)
  • Fragmenting sessions — Increasing interruptions or context-switching (worth discussing)
  • Stable patterns — Consistent work habits (usually fine)

For managers

Session data is descriptive, not prescriptive. A developer doing 100% micro sessions might be an on-call engineer handling rapid incidents — that's valuable work. Use session data to understand patterns, not to mandate work styles.

Why 45 Minutes?

The 45-minute gap threshold was chosen based on research on developer context-switching:

  • Developers typically need 15–20 minutes to re-establish context after an interruption
  • A gap of 45+ minutes likely indicates a genuine break (lunch, meeting, task switch)
  • Shorter thresholds (e.g., 15 min) would fragment natural coding pauses into separate sessions
  • Longer thresholds (e.g., 2 hours) would merge genuinely separate work periods

Built with intelligence, not surveillance.