Skip to main content

Module title

Module title 

Source
Expand description

Human-readable title derivation for auto-opened tasks.

When the journal auto-opens a task it has only a raw chat chunk to name it with. Early versions took the first non-empty line verbatim — which, at session start, is often terminal scrollback (685] INFO: Mapped {…}), a shell prompt (user@host:~$ …), or the journal’s own resume banner ([Task Journal resumed: …]). Those leak into the task list and the Claude Code session name.

humanize_title scans for the first line that looks like natural-language intent and returns it cleaned + truncated. When nothing qualifies it returns None so the caller declines to auto-open rather than label a task with machine noise.

Functions§

humanize_goal
Like humanize_title but truncated to max chars — used for the task goal, which tolerates a longer sentence than the 80-char title.
humanize_title
Pick the first natural-language line from raw as a task title. Returns None when the input is only logs / banners / shell prompts / JSON.