Decisions

  • Pending: Show full my-todos.md or only the “Now” section?

User Tasks


FR-013: Session Start — Show Todos

Summary

When starting a Claude Code session, automatically display next steps from vault/my-todos.md.

Problem / Motivation

Each session starts cold — Claude doesn’t know what the user was working on or plans to do. The user has to manually say “check my todos” or re-explain context. my-todos.md already tracks current focus, so this should be automatic.

Proposed Solution

A UserPromptSubmit hook that injects the contents of my-todos.md on the first prompt of each session. This gives Claude immediate context about priorities without the user having to ask.

Why UserPromptSubmit, not SessionStart?

Claude Code hooks don’t have a SessionStart event that can inject content into the conversation. UserPromptSubmit fires on every prompt — we use a state file to ensure injection only happens once per session.

Implementation

# .claude/hooks/session-start-todos.sh
LOCK="/tmp/claude-session-todos-$$"
 
# Only fire once per session (parent PID stays constant)
LOCK="/tmp/claude-session-todos-$PPID"
if [ -f "$LOCK" ]; then
  exit 0
fi
touch "$LOCK"
 
TODOS="$CLAUDE_PROJECT_DIR/vault/my-todos.md"
if [ -f "$TODOS" ]; then
  echo "--- Current Todos (from vault/my-todos.md) ---"
  cat "$TODOS"
  echo "---"
fi

Registration in .claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/session-start-todos.sh\""
          }
        ]
      }
    ]
  }
}

Open Questions

1. Scope of display

Question: Show full file or only the “Now” section?

OptionDescription
A) Full fileSimple, shows Now + Next + Backlog
B) Now section onlyParse out just the active items — less noise

Recommendation: Option A to start — file is short. Can filter later if it grows.


Phase Overview

PhaseDescriptionStatus
Phase 1Hook script + registration

Phase 1: Implement Hook —

Goal: Auto-show todos on first prompt of each session.

File / FeatureDetailsOwnerStatus
.claude/hooks/session-start-todos.shHook script with once-per-session guardopus
.claude/settings.jsonRegister UserPromptSubmit hookopus
Test manuallyStart new session, verify todos appearmv

Test

Manual tests

TestExpectedOwnerActualLast
Start new session, type anythingTodos injected into contextmvpending-
Second prompt in same sessionNo injection (once-per-session)mvpending-
my-todos.md is emptyNo output, no errormvpending-

AI-verified tests

ScenarioExpected behaviorVerification method

E2E tests

ScenarioAssertion

Integration tests

ComponentCoverage

Unit tests

ComponentTestsCoverage

History

DateEventDetails
2026-03-12CreatedUser wants automatic session context from todos

References

  • FR-011 (Hook Scripts) — this is one specific hook implementation
  • FR-004 (Session Start Recap) — complementary; recap shows git history, this shows user priorities