From f72a5ef99e2fbfed49eb739c4fffb0c273656d0b Mon Sep 17 00:00:00 2001 From: Can Celik Date: Fri, 21 Aug 2026 21:05:22 +0300 Subject: [PATCH] fix: keep background Claude MCP tasks working (#3094) --- docs/next/CHANGELOG.md | 1 + src/detect/manifests/claude.toml | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/next/CHANGELOG.md b/docs/next/CHANGELOG.md index 91e08af8..2ad6bc33 100644 --- a/docs/next/CHANGELOG.md +++ b/docs/next/CHANGELOG.md @@ -7,6 +7,7 @@ - Windows panes now keep bare `cursor-agent` launches detected after Cursor hands off to its bundled Node process. (#3032) - Oversized Kitty images no longer prevent smaller images shown later in the same pane from rendering. (#3033) - Claude Code panes now use visible turn, background shell, and background agent activity as working-state fallbacks when OSC titles are unavailable or disabled. (#1630, #2241) +- Claude Code panes now remain working while MCP tasks continue in the background after a turn ends. (#3090) - Tab bar status commands now remove ESC-prefixed terminal control sequences instead of displaying their sequence bodies as text. (#3001) - Unix plugin pane commands now default `PWD` to their resolved working directory, so direct popup tools open at explicit `--cwd` paths while preserving caller-provided `PWD` values. (#2984) diff --git a/src/detect/manifests/claude.toml b/src/detect/manifests/claude.toml index 5f9c79d9..696a1978 100644 --- a/src/detect/manifests/claude.toml +++ b/src/detect/manifests/claude.toml @@ -1,7 +1,7 @@ id = "claude" -version = "2026.08.19.1" +version = "2026.08.21.1" min_engine_version = 2 -updated_at = "2026-08-19T00:00:00Z" +updated_at = "2026-08-21T00:00:00Z" aliases = ["claude-code"] [[rules]] @@ -40,6 +40,24 @@ region = "last_non_empty_above_prompt_box" visible_working = true line_regex = ['^\s*[\x{002A}\x{00B7}\x{2722}\x{2736}\x{273B}\x{273D}]\s+Waiting for [1-9]\d* background agents? to finish\s*$'] +[[rules]] +id = "background_mcp_task_working" +state = "working" +priority = 965 +region = "bottom_non_empty_lines(12)" +visible_working = true +# Claude renders activity summaries at column zero; wrapped continuations are indented. +# Keeping that shape prevents user prompt text from impersonating this signal. +regex = ['(?m)^[\x{002A}\x{00B7}\x{2722}\x{2736}\x{273B}\x{273D}][ \t]+\S[^\n]*?(?:\n[ \t]+[^\n]*?){0,3}ยท(?:[ \t]+|\n[ \t]*)[1-9]\d*(?:[ \t]+|\n[ \t]*)MCP(?:[ \t]+|\n[ \t]*)tasks?(?:[ \t]+|\n[ \t]*)still(?:[ \t]+|\n[ \t]*)running[ \t]*$'] +not = [ + { contains = ["do you want to proceed?"] }, + { contains = ["esc to cancel"] }, + { contains = ["waiting for permission"] }, + { contains = ["do you want to allow this connection?"] }, + { contains = ["tab to amend"] }, + { contains = ["ctrl+e to explain"] }, +] + [[rules]] id = "btw_overlay_working" state = "working"