ask-forum: human-in-the-loop question flow via #ct-forum
Add ask-forum.sh + /ask-forum command: a live Claude session posts a question to the private #ct-forum forum and blocks (server-side, one tool call) until a human replies, then acts on the answer. Same session throughout - a three-way between the user, the session, and the teammate. No DMs, no second bot. Bumps the discord-bot submodule to the matching #ct-forum guard. Approved by Mike via #ct-forum (a-go, forum-only, /ask-forum yes), 2026-07-08. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
45
.claude/commands/ask-forum.md
Normal file
45
.claude/commands/ask-forum.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
name: ask-forum
|
||||
description: Ask a teammate (e.g. Mike) a question in the private #ct-forum Discord forum and BLOCK until a human answers, then act on the reply — a live three-way between the user, this same Claude session, and the teammate. No second bot, no DMs, one tool call (the wait runs server-side in bash).
|
||||
---
|
||||
|
||||
# /ask-forum — human-in-the-loop question via #ct-forum
|
||||
|
||||
Thin entry point to `.claude/scripts/ask-forum.sh`. Lets THIS session put a question
|
||||
to a human in the private #ct-forum forum and get their answer back in-session, so it
|
||||
can keep going. The forum post's thread id is the correlation key — the session reads
|
||||
only the thread it created, so an answer is never confused with another question's.
|
||||
|
||||
Forum-only by design (Mike's call, 2026-07-08): DM replies are intentionally not used,
|
||||
so answers stay visible to the team. The BEAST bot ignores #ct-forum, so the asking
|
||||
session is the only agent that consumes replies there.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Ask and block until a human replies (default timeout 600s, poll 8s):
|
||||
bash .claude/scripts/ask-forum.sh "your question" --tag @264814939619721216
|
||||
|
||||
# Re-read a thread you already asked in (one-shot, no waiting):
|
||||
bash .claude/scripts/ask-forum.sh --read <thread_id>
|
||||
|
||||
# Resume blocking on a thread already posted (e.g. after a timeout):
|
||||
bash .claude/scripts/ask-forum.sh --wait <thread_id> --timeout 1800 --poll 10
|
||||
```
|
||||
|
||||
Flags: `--title "short title"` (forum post name; defaults to first 60 chars of the
|
||||
question), `--timeout SEC`, `--poll SEC`, `--tag @<discord_id>` (repeatable — pings
|
||||
that person; ids in `.claude/users.json`: mike 264814939619721216,
|
||||
howard 624667664501178379, winter 624666486362996755, rob 261978810713505792).
|
||||
|
||||
## How to run it well
|
||||
|
||||
- **Long waits → background it** with `run_in_background: true` (NO shell `&` — that
|
||||
forks the wait off and exits early). You get the answer when the human replies.
|
||||
- Only **non-bot** replies count as answers, so bot chatter can never be mistaken for
|
||||
the human's answer.
|
||||
- Exit codes: 0 answered · 2 no token · 3 Discord API error · 4 timeout (thread stays
|
||||
open — resume with `--wait <thread_id>`).
|
||||
|
||||
Channel: #ct-forum (`1522960388432465950`), private — @everyone denied; Howard, Mike,
|
||||
and the bot allowed. Add someone via a channel permission overwrite if they need access.
|
||||
Reference in New Issue
Block a user