Skip to main content

cop

Delegate coding tasks to a GitHub Copilot CLI agent running in a Herdr pane, and collect the result later.

Typical use: Claude Code is your daily driver, but cheap/parallelizable subtasks get farmed out to Copilot running the Luna model (gpt-5.6-luna) — Luna is cheaper and noticeably sharper than Haiku, so it beats reaching for Haiku as your low-cost delegate:

cop start "Add unit tests for src/foo.py" --dir ~/r/myrepo --model gpt-5.6-luna

Install

uv tool install cop-pilot
# or: pip install cop-pilot
# or: uv tool install git+https://github.com/vivainio/cop-pilot

Requires: running inside a Herdr-managed pane (HERDR_ENV=1); herdr and copilot on PATH.

Usage

cop start "Add unit tests for src/foo.py" --dir ~/r/myrepo
# -> prints a job id immediately, agent keeps working in its own pane

echo "fix the typo in README" | cop start --dir ~/r/myrepo
# task from stdin

cop collect <job-id> --wait
# -> blocks until the agent settles, prints/stores its response

cop respond <job-id> "yes, proceed"
# answer a permission/approval prompt that left the job blocked

cop show <job-id>          # full detail for one job
cop list                   # all known jobs, cached status (offline)
cop status                 # all known jobs, refreshed from herdr

cop start [<task>] --dir <path> [--name <mnemonic>] [--model <id>] — agent is named cop-<name-or-dirname>, falling back to appending the job id if that name is taken. --model is passed through to copilot --model <id>; omit it and copilot falls back to whatever's set as the default model in ~/.copilot/settings.json ("model": "...", set via the /model slash command in an interactive copilot session). Every job gets its own herdr workspace, labeled with its agent name so it's identifiable in the workspace list. Add --worktree to also run it in a fresh git worktree (branch worktrees/<name>) instead of --dir directly, so it can't collide with other work already in that checkout. --branch <ref> (only with --worktree) picks what that new branch starts from, instead of --dir's current HEAD.

cop collect <job-id> [--wait] [--timeout MS] [--raw] — without --wait, non-blocking status check. --raw dumps the full pane instead of just the last turn.

Every command accepts --json. Jobs are flat JSON files under ~/.cop/jobs (override with COP_HOME).

Claude Code skill

cop install-skills                       # installs to ~/.claude/skills/
cop install-skills --skills-dir ./skills # custom target

With the skill installed, Claude Code drives cop itself when you delegate:

/cop check this pre-commit hook script, does it need updating for the new CI runner: https://issues.example.com/browse/PROJ-1234

Claude reworks the short ask into a self-contained task before handing it off — the delegate has no memory of this conversation:

cop start "Review the repo's pre-commit hook script(s) against
https://issues.example.com/browse/PROJ-1234 (CI runner is being upgraded).
Determine whether the hook needs changes to keep working there, and if so
propose the fix." --dir ~/r/myrepo

Delegated. Job started: 504ce49b (agent cop-check-hook, pane w8K:p6) in ~/r/myrepo.

Collecting in the background.

Development

uv sync                    # install with dev dependencies
uv run pytest tests/ -v    # run tests
uv run ruff format .       # format
uv run ruff check .        # lint
uv run ty check            # type check

hookmaster init . installs a pre-commit hook (githooks.toml) that runs ruff format --check ..

Known limitations

  • Pane reads can truncate very long responses — ask the task (via respond) to write its answer to a file and reply with the path instead.
  • No session reuse across jobs — each start begins a fresh Copilot session.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cop_pilot-0.2.0.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cop_pilot-0.2.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file cop_pilot-0.2.0.tar.gz.

File metadata

  • Download URL: cop_pilot-0.2.0.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cop_pilot-0.2.0.tar.gz
Algorithm Hash digest
SHA256 18b799512231866b20254208be464607ff22557c7742a0034291600d03cf18c3
MD5 81285f16f5b48267aae26ff4ccb0d6fb
BLAKE2b-256 d92451685a44bb469fa5486546e092dc8d842290723fb9db4a2abb5eacd359ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for cop_pilot-0.2.0.tar.gz:

Publisher: publish.yml on vivainio/cop-pilot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cop_pilot-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cop_pilot-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cop_pilot-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f209fceb4a6841f856f10eaf09994c97f73afdda72f5d3b807c33f0f55163aa6
MD5 21859e2871ccd3d61761179363165440
BLAKE2b-256 e5a404cadb9b44c76a1779ebea8e58f1d22d580e814b88ee08835b3c16a04014

See more details on using hashes here.

Provenance

The following attestation bundles were made for cop_pilot-0.2.0-py3-none-any.whl:

Publisher: publish.yml on vivainio/cop-pilot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page