Skip to content

Session start — API reference

CLI

main

main()

Read session start event from stdin and output companion context.

Context builder

board_section

board_section() -> str

A one-line summary of the current project's live board columns.

Returns "" when the project has no actionable (non-done) cards, so the context stays silent when there's nothing to surface.

build_session_context

build_session_context(session_id: str | None = None) -> str

Assemble the full session-start context markdown.

PARAMETER DESCRIPTION
session_id

The starting Claude Code session, when known (the hook passes it; the home TUI's preview has none), adding the cards bound to it.

TYPE: str | None DEFAULT: None

Returns "" when every section is silent — the hook then emits nothing, keeping quiet sessions quiet.

inbox_section

inbox_section() -> str

The quick-capture inbox count as a compact label.

Returns "N inbox" when there are captured items waiting to be triaged, or "" when the inbox is empty — so the context stays silent when there's nothing to sort.

reminders_section

reminders_section() -> str

Overdue reminders, formatted like mc-tool-reminders check.

Returns "" when nothing is overdue, so the context stays silent.