Scopey is a lightweight Rust CLI that turns prompts into a current scope for coding-agent sessions (Claude Code, Codex, Grok, Pi, OpenCode), checks agent activity against it via hooks, and injects corrections or notifications when sessions drift.

Stars

27

7-day growth

No data

Forks

0

Open issues

0

License

MIT

Last updated

2026-07-31

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It adds a cross-harness scope-enforcement layer to AI coding sessions using a fast local CLI, with current-state scope extraction, background judging, and optional Herdr/OS notifications, while being designed to stay fast and avoid disrupting the agent.

Who it is for

  • Developers running long Claude Code, Codex, Grok, Pi, or OpenCode sessions
  • Teams that need to monitor multiple coding-agent sessions for drift
  • Agent/tooling authors interested in hook-based session guardrails
  • Users who want logs and insights about agent behavior

Use cases

  • Keep a coding task confined to specified files or modules and catch when the agent touches unrelated code
  • Review off-track or warning sessions across dates and harnesses with `scopey insights`
  • Get desktop or Herdr notifications when an agent session needs attention
  • Debug agent-session behavior with structured JSONL logs and `scopey logs`

Strengths

  • Multi-harness setup via `scopey setup` installs hooks for Claude, Codex, Grok, Pi, and OpenCode
  • Current-state scope model treats each prompt as an authoritative mutation and logs transitions with before/after hashes
  • Runtime safety keeps hooks responsive with bounded background model jobs, per-session serialization, no self-triggering, and `scopey doctor`/`purge`
  • Session insights and JSON logs surface drift, evaluation coverage, insufficient-evidence counts, and contaminated scope records

Considerations

  • Pre-1.0 software: config and session formats may evolve before the first stable release
  • Live scope extraction requires at least one supported coding-agent CLI installed
  • Privacy: session files and logs contain prompts and trajectory excerpts, and invoking agent CLIs may send prompts to their configured providers

README quick start

scopey

It looks like you're writing code.Would you like help staying in scope?

Keep Claude Code, Codex, Grok, Pi, and OpenCode sessions aligned with your current intent.

Scopey is a lightweight Rust CLI that turns your prompts into a current scope, checks coding-agent activity against it, and surfaces sessions that need your attention. It can inject a correction into the active session and notify you when work drifts off scope.

Scopey is pre-1.0 software. Config and session formats are designed to remain compatible, but may still evolve before the first stable release.

Install

Install the prebuilt binary with Homebrew:

brew install ArchAstro/tools/scopey
scopey setup
scopey doctor

For installation from source, prerequisites are stable Rust and at least one supported coding-agent CLI for live scope extraction. Tests do not require an agent CLI.

Install from the GitHub source repository:

cargo install --git https://github.com/ArchAstro/scopey.git
scopey setup
scopey doctor

Or clone the repository and use the Makefile:

make                 # debug build
make build-release
make install         # cargo install --path . --force
make setup           # release build + hooks + config
make doctor
make verify-models   # probe claude/codex fast defaults
make test            # unit + CLI integration tests
make lint
make release-check

Tests cover recursion guards, session storage, JSONL logs, judgement parsing, hook detection, config loading, model resolution, and hook CLI paths under isolated SCOPEY_HOME.

Or without make:

cargo install --path .
scopey setup
scopey doctor
scopey models --verify

Harnesses

FlagInstalls
--claude / --no-claude~/.claude/settings.json
--codex / --no-codex~/.codex/hooks.json (trust via /hooks)
--grok / --no-grok~/.grok/hooks/scopey.json
--pi / --no-pi~/.pi/agent/extensions/scopey.ts (restart Pi)
--opencode / --no-opencode~/.config/opencode/plugins/scopey.js
scopey setup --force
scopey setup --no-claude --no-codex --grok --no-pi --no-opencode   # grok only

Model selection

Summarize/judge use a cheap/fast model on the same harness as the agent session when possible.

|

Description

Keep Claude/Codex/Grok/Pi/OpenCode sessions on scope

Related repositories

Similar projects matched by category, topics, and programming language.

l0ng-ai
Featured
l0ng-ai GitHub avatar

tty7

tty7 is a fast, GPU-accelerated terminal workbench with persistent sessions, built-in input tools, SSH support, and coding agent awareness.

Developer ToolsCLI & Terminal
359
steelbrain
Featured
steelbrain GitHub avatar

reims-vgpu

reims-vgpu is an experimental virtual GPU for macOS guests that uses QEMU to decode the guest's GPU command stream and execute it through Metal or Vulkan, leveraging the built-in AppleParavirtGPU driver without requiring custom kexts.

Desktop Apps
143
m-novotny
Featured
m-novotny GitHub avatar

memguard-rs

A Rust library that provides secure memory handling primitives including zeroization on drop, memory locking, constant-time comparison, and compile-time guarded regions, with zero dependencies and no_std support.

Embedded & IoTSecurity
131