From f19feafdc0b9e4a7094b91c2dca285ad71458848 Mon Sep 17 00:00:00 2001 From: Matt McKenna Date: Tue, 3 Feb 2026 08:30:32 -0500 Subject: [PATCH 1/2] Store command in database when using MCP run_task tool The MCP server was not storing the command in the queue database, while the CLI (tq.py) was. This caused the prism plugin to fall back to showing just task counts instead of the actual command being run. - Add command parameter to wait_for_turn function - Include command in INSERT statement - Pass command from run_task to wait_for_turn Co-Authored-By: Claude Opus 4.5 --- task_queue.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/task_queue.py b/task_queue.py index 826b096..f5003cb 100644 --- a/task_queue.py +++ b/task_queue.py @@ -231,7 +231,7 @@ def get_memory_mb() -> float: # --- Core Queue Logic --- -async def wait_for_turn(queue_name: str) -> int: +async def wait_for_turn(queue_name: str, command: str | None = None) -> int: """Register task, wait for turn, return task ID when acquired.""" # Ensure database exists and is valid ensure_db() @@ -250,8 +250,8 @@ async def wait_for_turn(queue_name: str) -> int: with get_db() as conn: cursor = conn.execute( - "INSERT INTO queue (queue_name, status, pid, server_id) VALUES (?, ?, ?, ?)", - (queue_name, "waiting", my_pid, SERVER_INSTANCE_ID), + "INSERT INTO queue (queue_name, status, pid, server_id, command) VALUES (?, ?, ?, ?, ?)", + (queue_name, "waiting", my_pid, SERVER_INSTANCE_ID, command), ) task_id = cursor.lastrowid @@ -440,7 +440,7 @@ async def run_task( key, value = pair.split("=", 1) env[key.strip()] = value.strip() - task_id = await wait_for_turn(queue_name) + task_id = await wait_for_turn(queue_name, command) mem_before = get_memory_mb() start = time.time() From b855159772ad02a1a4e98e7865adf2e6ef56198a Mon Sep 17 00:00:00 2001 From: Matt McKenna Date: Tue, 3 Feb 2026 09:26:27 -0500 Subject: [PATCH 2/2] Bump version to 0.3.2 for release Co-Authored-By: Claude Opus 4.5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 315b80c..12f952f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agent-task-queue" -version = "0.3.1" +version = "0.3.2" description = "MCP server for sequential task execution via FIFO queue" readme = "README.md" requires-python = ">=3.10"