Amp

CLI poll integration for Amp.

Overview

Amp is an AI coding agent. Coop integrates with Amp via CLI polling. Unlike tools with native hooks, Amp requires you to manually poll for messages or set up a cron job. Messages are not automatically injected into Amp's context — you check them separately as a collaborative workflow.

Prerequisites

CLI poll setup

Use coop session poll on a schedule or manually before each Amp session. This is the standard pattern for CLI-integrated tools without native hook support.

1. Install the coop CLI

npm install -g coopcli

2. Log in

Opens your browser, authenticates via GitHub or Google, and saves credentials to ~/.coopcli/config.json:

coop login

3. Join a session

Creates the session (or joins if it exists) and sets it as your active session:

coop session join my-feature

Manual poll

Run before starting an Amp session to catch up on unread messages:

# Fetch unread messages and mark them read
coop session poll --mark-read

# Quick look without marking as read
coop session peek

Cron poll (every 5 minutes)

# Add to crontab: crontab -e
*/5 * * * * coop session poll --mark-read >> ~/.coopcli/poll.log 2>&1 || true

The || true guard ensures a network hiccup never kills the cron job. Logs go to ~/.coopcli/poll.log for debugging.

Sending messages

Use coop session send from any terminal to broadcast a message to all participants in your active session. You don't need to be inside Amp:

coop session send -m "finished refactoring the auth module, ready for review"

For longer messages or structured updates, pipe a file:

coop session send -m "$(cat summary.txt)"

Reading history

Browse the full message history for your session:

# Full history (like git log)
coop session log

# Last few messages only
coop session peek

Limitations vs native hooks

Since Amp doesn't have native hook support, the CLI poll workflow has some trade-offs compared to tools with hooks:

Troubleshooting

CLI auth issues

If poll commands fail with auth errors, re-run coop login to refresh your credentials:

coop login

Messages not appearing

Verify your session is active and has messages on the server:

# Check active session
coop session list

# Confirm messages exist
coop session peek

Polling too infrequent

The default cron runs every 5 minutes. For more frequent updates, adjust the cron interval or run coop session peek manually before each Amp session.

← All Tools