iamwaiting/README.md
2026-01-05 18:38:20 -05:00

3.3 KiB

iamwaiting

Send Discord notifications when Claude Code is waiting for your input.

What is this?

iamwaiting is a lightweight CLI tool that integrates with Claude Code's hook system to send you Discord notifications when Claude needs your attention. Perfect for long-running tasks where you step away from your terminal.

Quick Start

1. Install Dependencies

Requires Babashka:

# macOS
brew install borkdude/brew/babashka

# Linux
bash <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)

2. Set Up Discord Webhook

./iamwaiting setup

Follow the prompts to enter your Discord webhook URL. Get a webhook URL from: Discord Server → Server Settings → Integrations → Webhooks → New Webhook

3. Test It

./iamwaiting test

You should see a test message in your Discord channel!

4. Configure Claude Code Hook

Add to ~/.claude/hooks.edn:

{:agent-waiting-for-user {:command ["/full/path/to/iamwaiting/iamwaiting"]}}

Or if iamwaiting is in your PATH:

{:agent-waiting-for-user {:command ["iamwaiting"]}}

Usage

Manual Testing

# Send a test notification
./iamwaiting test

# Send a waiting notification
./iamwaiting

# Send notification with custom data
./iamwaiting '{"cwd": "/path/to/project"}'

Babashka Tasks

bb setup  # Run setup wizard
bb test   # Send test message
bb run    # Send waiting notification

Configuration

Configuration is stored in ~/.iamwaiting/config.edn:

{:webhook-url "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"}

You can also set the webhook URL via environment variable:

export IAMWAITING_WEBHOOK_URL="https://discord.com/api/webhooks/..."

How It Works

When Claude Code is waiting for user input, the agent-waiting-for-user hook is triggered, which:

  1. Runs the iamwaiting command
  2. Reads the Discord webhook URL from config
  3. Formats a message with project context (name, path, timestamp)
  4. Sends an HTTP POST to Discord's webhook API
  5. Returns success/failure status

The notification appears in your Discord channel with:

  • Waiting indicator
  • 📁 Project name and path
  • 🕐 Timestamp

Example Notification

⏳ **Claude is waiting** in `my-project`
📁 Path: `/home/user/repos/my-project`
🕐 Time: 14:23:45

Troubleshooting

"No webhook URL configured"

  • Run ./iamwaiting setup to configure your webhook

"Failed to send message"

  • Check your webhook URL is correct
  • Verify the webhook hasn't been deleted in Discord
  • Check your internet connection

Hook not triggering

  • Verify hooks.edn syntax is correct
  • Use full absolute path to the script
  • Check Claude Code hooks documentation

Security

  • Keep your webhook URL secret (treat it like a password)
  • Config file has standard Unix permissions (readable only by you)
  • Only directory paths are sent in notifications (no code or sensitive data)

Requirements

  • Babashka (bb command)
  • Discord webhook URL
  • Internet connection

License

Part of the ajet-industries monorepo.