tzafrir/human-in-the-loop

Claude 會把只能由你完成的工作交給你,這些任務會留在 My tasks 面板等你處理;你的回覆會傳回 Claude,避免需求在對話中消失。
tzafrir/human-in-the-loop

Claude 會把只能由你完成的工作指派成任務,不會把它塞進回覆裡。任務會留在 My tasks 面板,並在提示列下方顯示數量,直到你完成、回答或拒絕它們。Claude 會繼續處理其他工作,你的回覆則會在適當時機以你的原話傳回。任務會跨越壓縮與新的工作階段保留,也支援 Done、選項、回答,以及附上理由的拒絕。這個外掛使用 Claude Code 的 function hooks(早期存取),只有在啟用 function hooks 的環境中載入。安裝方式是 /plugin marketplace add tzafrir/human-in-the-loop 與 /plugin install human-in-the-loop@human-in-the-loop;也可以在命令列用 claude plugin marketplace add / claude plugin install 安裝,然後開始新的工作階段或執行 /reload-plugins。
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add tzafrir/human-in-the-loop claude plugin install human-in-the-loop

Claude hands you the tasks only you can do. They wait until you act, and your answer goes back to Claude.
Claude often needs something only you can do: a key in .env, an approval on staging, a command on your own machine, a decision. Today it says so in the middle of a reply. You're busy steering the next fix, and the ask scrolls away. At best Claude keeps repeating "I still need you to…"; at worst the ask is lost.
With this mod, Claude assigns the ask as a task instead. It waits in the My tasks pane, counted under the prompt, until you do it, answer it or reject it.
Get our Stripe webhooks library ready to open-source.
Claude works through it, and three times hits something only you can do: the integration tests need your Stripe key, making the repo public is your call, and the package needs a name. Each becomes a task, and Claude keeps working:
╭─ My tasks ──────────────────────────────────────────────────────────╮
│ ☐ 3 tasks for you │
│ │
│ ☐ #1 Add STRIPE_SECRET_KEY to .env 2m │
│ The integration tests run against Stripe's test mode and need it. │
│ Done when: It's in .env. Don't paste it here. │
│ d: Done r: Answer… x: Reject… │
│ ☐ #2 Decide whether to make the repo public 1m │
│ ☐ #3 Choose the package's name on npm now │
│ │
│ Esc: back to the prompt Hide │
╰─────────────────────────────────────────────────────────────────────╯
☐ 3 tasks for you · /my-tasks
d. The key never passes through Claude.1 makes the repo public, 2 keeps it private.r, type @acme/stripe-hooks, Enter.Answer whenever it suits you. Answers you give while Claude works wait for it, and your next answer after it stops takes them along. Here #1 and #2 were answered while Claude worked and #3 after, so Claude gets them as one message, in your words:
My responses to tasks you gave me (Human in the loop):
#1 Add STRIPE_SECRET_KEY to .env: Done.
#2 Decide whether to make the repo public: I chose "Make it public".
#3 Choose the package's name on npm:
@acme/stripe-hooks
Claude picks up where it left off: the integration tests pass, the repo goes public, and the package gets its name. Publishing is left to you.
assign_task: an imperative title, why it's needed, what counts as done, and a kind (do, answer or choose).☐ 3 tasks for you · /my-tasks./my-tasks opens it any time, with the keyboard.1–4), an answer (r), or a rejection with a reason (x). Click, or focus the pane with /my-tasks or ctrl+x tab and use the keys.↳ Answer to #3:, and you paste and press Enter.It never draws in the band above the prompt, so it works beside band mods such as What's Agent Doing.
In Claude Code:
/plugin marketplace add tzafrir/human-in-the-loop
/plugin install human-in-the-loop@human-in-the-loop
Or from your shell:
claude plugin marketplace add tzafrir/human-in-the-loop
claude plugin install human-in-the-loop@human-in-the-loop
Then start a new session (or run /reload-plugins).
Requirements: Claude Code in a terminal, or in the desktop app's Code tab. The plugin is a mod, written with Claude Code's function hooks, which are early access: they load only where function hooks are enabled, and their API may change between releases.
↳ Answer to #3: …), which it turns into that same response, and to attach responses not yet sent as notes Claude reads.assign_task, list_tasks and withdraw_task, which the mod itself serves. Every other tool call passes through untouched.Report a problem or ask for a feature in GitHub Issues. Read the privacy policy.
Load the plugin from a clone; the session reloads it as you edit:
git clone https://github.com/tzafrir/human-in-the-loop
claude --plugin-dir human-in-the-loop
claude plugin validate --strict human-in-the-loop/.claude-plugin/plugin.json
claude plugin test human-in-the-loop
| File | What it does |
|------|--------------|
| hooks/register.tsx | The tools Claude calls, delivering your responses, the My tasks pane and status line, /my-tasks, long answers through the prompt box |
| hooks/project.ts | Each session's tasks in the project's store, and taking on those of sessions that ended |
| hooks/tasks.ts | Reading a task from Claude's call, what Claude is told, the status line, secret shapes |
| hooks/text.ts | Printable labels, ages, sizes |
| types/index.d.ts | The $.state contract: the tasks, the selection, the open field |
| tests/register.test.tsx | Assigning, the pane and /my-tasks, every response and when it reaches Claude, long answers, tasks carried across sessions |
| docs/DESIGN.md | The design and the decisions behind it |
MIT