Skip to content

kiro-notion task-work: URL positional not consumed by kiro-cli worker (regression) #157

Description

@martin-conur

Symptom

When PM dispatches a Kiro worker with a spec URL, the worker tab opens but kiro-cli sits at the agent's welcome message — the URL is never read. PM has to type the URL into the worker tab manually for the worker to pick it up.

Reporter: "in early versions of this repo worked just fine" — suspected regression.

Repro

From PM tab on the kiro-notion loadout:

task-work fix-jwt-secret-rotation "https://app.notion.com/p/some-issue" --trust-all -m claude-opus-4.7

Worker tab opens. kiro-cli chat --agent worker starts and prints its welcome:

Worker mode. Give me a task URL or name and I'll implement it from the spec.

…and idles. The URL passed to task-work is never consumed.

What task-work does (it looks correct)

kiro-notion/bin/task-work:155-166 builds:

kiro-cli chat --agent worker [--model X] [--trust-all-tools] "Implement task: <printf %q url>"

So the URL is appended as a positional argument. (kiro-notion/agents/worker.json:32 is the welcome message string the user is seeing — kiro-notion/agents/worker.json:4 explicitly says "When starting, ask which task to implement (or accept a Notion URL)".)

Suspected root cause

kiro-cli chat --agent <name> is not treating the trailing positional as the agent's first user turn — it's launching the agent in interactive mode and waiting for the user to type. Two possibilities:

  1. kiro-cli interface change. A newer kiro-cli release dropped (or never had) positional-prompt support after chat. The claude-notion analogue (claude-notion/bin/task-work:163) works because claude "/worker Implement task: <url>" reliably feeds the slash-command-and-prompt to Claude Code as the first message; kiro-cli may need an explicit --message / --prompt / --initial-input flag, or input piped on stdin.
  2. Agent welcome message intercepts. Kiro may print welcomeMessage and clear the input buffer before the positional ever reaches the agent.

Where to look

  • kiro-notion/bin/task-work:155-166 — build_kiro_cmd(). May need to switch from positional to --message, or pipe via stdin: echo "Implement task: <url>" | kiro-cli chat --agent worker ....
  • kiro-cli chat --help (run on a machine with kiro-cli installed) — confirm the canonical way to seed the first turn.
  • Affects the parallel kiro-* loadouts too: kiro-gh/bin/task-work and kiro-jira/bin/task-work use the same pattern; verify and fix together.

Git history

kiro-notion/bin/task-work has had cmd+=" \"Implement task: \$NOTION_URL\"" since the file's introduction (last touched in ac6dd41 and 0c278a6 for shell-quote hardening, but the structure didn't change). So if "early versions worked," the regression is likely in kiro-cli, not in this script — but the fix lives in this script (switch to whatever invocation kiro-cli actually honors now).

Repro env

  • Reporter: kiro-notion loadout
  • Command flags: --trust-all (-a) and -m claude-opus-4.7 were both passed; both are valid per kiro-notion/bin/task-work:74-77. Note: claude-opus-4.7 may not be a valid kiro-cli model identifier (the public IDs are claude-opus-4-7 / claude-sonnet-4-6 / claude-haiku-4-5-20251001 — no dot, hyphen-separated). Unrelated to the URL bug, but worth confirming when verifying the fix.

Priority

P1 — this breaks the core PM→worker handoff on Kiro. Every Kiro dispatch requires manual URL re-entry.

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions