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_titlebut truncated tomaxchars — used for the task goal, which tolerates a longer sentence than the 80-char title. - humanize_
title - Pick the first natural-language line from
rawas a task title. ReturnsNonewhen the input is only logs / banners / shell prompts / JSON.