[Feature] Session titles: template or auto-generated titles for automation-spawned sessions (raw prompt truncation pollutes the sidebar)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Environment
ZCode Desktop 3.14.0 (3.14.0.7681), macOS x86_64
Scenario
Recurring automations spawn a new session per run, and the spawned session's title is taken from the first ~50 characters of the automation prompt (title_source = first_input in ~/.zcode/cli/db/db.sqlite). Any automation whose prompt starts with instructions — the common case — therefore produces a pile of identical, truncated instruction text as titles. Example: a twice-hourly repo watcher whose prompt begins "You are the auto-DESIGN watcher of repo memo (working dir…" has produced 50+ same-titled sessions; the only way to tell runs apart is the sidebar's relative time ("2 hours ago"), which stops being usable the next day.
The automation itself already has a human-readable title (e.g. "auto DESIGN"), but it does not propagate to the spawned sessions' titles.
At the same time, the session table already carries a title_source enum {default, first_input, generated, custom} — generated exists but is not used for automation runs.
Request (three options, any would help — listed by decreasing simplicity)
- Minimal default (zero config): spawn the session with title = automation title + run timestamp, e.g.
auto DESIGN · 2026-09-19 09:12. The automation title exists at spawn time; no UI or template engine needed. - Per-automation title template in the automation settings, with variables (
{{date}},{{time}},{{run_id}}, optionally{{first_result}}). - Auto-generated titles: run the same title generation used for interactive sessions (
title_source = generated) on automation sessions after the first assistant reply.
Related issues
- #520 — accumulation of automation runs (dates/day-grouping/auto-archive); a title template is one of its suggestions. This issue is scoped narrower: the naming mechanics itself, not grouping/archival.
- #712 — expose
renameSessionto agents. Complementary: runtime-derived info a template cannot know (e.g. a ticket number the automation picks mid-run) could then be set by the agent itself.
Value
With titles that identify the automation and the run, the session list becomes a readable run log: renaming/backups/archiving can map sessions to runs, and #520's grouping/cleanup workflows get a stable key to group by.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting ~/.zcode/cli/db/db.sqlite, especially the session table and its title_source enum, then trace how automation-spawned sessions are created. Resolve which of the three title approaches is intended and verify that completed runs have distinct, automation-identifying sidebar titles without relying on relative time.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100