Skip to content

Add work-log-tracker hook β€” lightweight session logging πŸ€–πŸ€–πŸ€–#1422

Draft
vidhartbhatia wants to merge 1 commit intogithub:stagedfrom
vidhartbhatia:add-work-log-tracker-hook
Draft

Add work-log-tracker hook β€” lightweight session logging πŸ€–πŸ€–πŸ€–#1422
vidhartbhatia wants to merge 1 commit intogithub:stagedfrom
vidhartbhatia:add-work-log-tracker-hook

Conversation

@vidhartbhatia
Copy link
Copy Markdown

What this adds

A lightweight work-log-tracker hook that logs Copilot coding agent session start/end events to ~/.copilot-work-log/sessions.jsonl.

What it tracks

  • Session start: timestamp, working directory, git repo name, git branch, PID
  • Session end: timestamp, PID

No code or prompts are logged β€” only session metadata.

Why it's useful

Developers often lose track of what they worked on across repos and branches. This hook provides a zero-config, append-only log of session activity that can be queried later (e.g., "what repos did I touch last week?").

Files

File Purpose
hooks.json Hook event configuration (sessionStart + sessionEnd)
log-session-start.sh Captures cwd, git repo/branch, timestamp
log-session-end.sh Captures end timestamp
README.md Documentation with installation, config, and privacy info

Relationship to existing work

  • Complementary to What-I-Did-Copilot β€” that extension focuses on summarizing what the AI did; this hook focuses on when/where you worked
  • For full-featured work tracking (manual entries, categories, git backup, markdown rendering), the README links to copilot-brag-sheet

Design choices

  • No dependencies β€” pure bash, no jq required
  • Privacy-first β€” only metadata logged, stored locally in ~/.copilot-work-log/
  • Configurable β€” WORK_LOG_DIR env var to redirect output, SKIP_WORK_LOG=true to disable
  • Follows the same patterns as existing hooks (session-logger, governance-audit)

πŸ€–πŸ€–πŸ€–

Adds a simple hook that logs Copilot coding agent session start/end
events to ~/.copilot-work-log/sessions.jsonl with git repo context.

Useful for tracking what you worked on across repositories. For
full-featured work tracking (manual entries, categories, git backup,
markdown rendering), see copilot-brag-sheet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant