Registry Mirror
Skip to content

[Feature] Run a local script when a task changes status #941

Closed

Description

@mateusmatiazzi

Problem

I would like to use ZenNotes tasks to coordinate work with external tools. Currently, changing a task's status and starting the corresponding tool are separate manual
steps.

For example, I keep software tasks as notes with instructions for Codex. When a task becomes ready, I have to start Codex manually and pass those instructions to it.

Feature request

Could workflows support running a user-configured local script or command when a task changes status?

For example:

• Moving a task from backlog to ready starts a new Codex agent using the task note as its instructions.
• Moving it to ready for review starts a separate agent to review the work.

Ideally, the command could receive the task's content, note path, and previous and new statuses. This could also be useful for other command-line tools, without requiring a dedicated Codex integration.

The trigger should work when changing status through Kanban or the note editor. Editing or saving a task without changing its status should not start another execution.

Desktop-only support while ZenNotes is open would already cover my use case.

I understand that workflows currently exclude shell execution. Would an optional, explicitly enabled feature like this fit the project's scope?

Activity

  1. adibhanna commented on Oct 14, 2026

    @adibhanna
    Contributor

    Thanks for the clear write-up, @mateusmatiazzi. Short answer: we'd rather not have ZenNotes run commands itself, but we can give you exactly the signal you need to run them yourself.

    Why not from workflows: workflows live inside the vault and sync to every device, so a step that runs a command would run on any desktop that opens the vault, including a shared one. That's why the workflows design leaves shell steps out on purpose.

    What already works today:

    • Tasks are plain Markdown. A task note keeps its column in frontmatter (status: ready), and a checkbox task keeps it inline (@status:ready). Moving a card on the Kanban board, or editing the note, just rewrites that line.
    • So a small script that watches your vault folder, reads the status: line of a note when it changes, and compares it with the last value it saw has the previous and the new status. It can then start Codex with the note as input, for example codex exec "$(zn read "inbox/My task.md")".
    • ZenNotes' MCP server (Settings → MCP in the desktop app, or zn mcp) lets the agent read its task note, check off subtasks and leave comments on it while it works.

    What we'll add: something like zn task watch --json, which prints one line for each task whose status changes, with the note path, title, task text and the previous and new status. Your script then doesn't need to parse files or remember state. It only reports and never runs anything. zn task list --json will carry the custom status too; today it leaves it out.

  2. added
    enhancement
    tasks
    cli-mcp
    on Oct 14, 2026
  3. adibhanna commented on Oct 14, 2026

    @adibhanna
    Contributor

    Shipped in zn 0.8.0: https://github.com/ZenNotes/tui/releases/tag/v0.8.0

    zn task watch --json prints one line for each task whose status changes (a task note's status:, a checkbox task's @status:, or the checkbox itself), with the note path, title, task text, and the previous and new status. Moving a card on the Kanban board, editing the note anywhere, and zn task toggle all count; saving a task with the same status does not. It only reports, so your script decides what runs. For your flow, something like:

    zn task watch --json | while IFS= read -r change; do
      [ "$(jq -r .status <<<"$change")" = ready ] || continue
      path=$(jq -r .path <<<"$change")
      codex exec "$(zn read "$path")" &
    done

    zn task list --json and list_tasks in zn mcp now also give each task's status. Update with brew upgrade zn or zn update; a zn installed from the desktop app's Settings → CLI updates itself within a day. Thanks for the idea and the clear write-up.

  4. mateusmatiazzi commented on Oct 14, 2026

    @mateusmatiazzi
    Author

    Thank you so much, @adibhanna.

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

    cli-mcpenhancementtasks

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions