Skip to content

[Bug]: MCP thread and scheduled-task titles keep line breaks when the title is set explicitly #44625

Done

Description

@rune-gh

#44597 made prompt-derived titles from create_threads and schedule_task stop at the first line break. An explicit title that contains a CR, LF, or Unicode line/paragraph separator is still stored as-is.

Sidebar thread rows and scheduled-task lists are one line, so the remainder is lost or breaks layout.

Current

create_threads, t3_thread_launch, t3_thread_fork, delegate_task, schedule_task, and update_scheduled_task persist an explicit title such as Auth review\nIgnore this including the line break.

Expected

The stored title is the first non-empty line, Auth review. Prompt-derived titles already behave this way after #44597.

Steps

  1. Call create_threads (or t3_thread_launch / schedule_task) with title: "Auth review\nIgnore this".
  2. Read the created thread or scheduled task title.

The title still contains the line break. The same happens with \r, \u2028, and \u2029.

Environment

t3code main after #44597 (ed26e0d).

I have a fix with regression tests ready and will open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions