Canary
Canary has two surfaces:
canary: the repo-local monitor and wrapped-agent launcher.canary servewatches repo changes and serves the local review UI.canary codex/canary claudestart attributed agent sessions.canaryctl: the tool the agent uses to create and update that context.
The user can:
- inspect what files changed
- read the agent's threads and file briefs
- reply to threads in the UI
Canary's durable artifacts are:
threads: focused review discussions for one issue, usually tied to a file and line rangefile briefs: durable notes about what a file owns and what future editors should know
Use Canary when the user should be able to review a non-obvious change after the chat, not just read about it in the transcript.
Authorship rules:
- If you are running inside a wrapped Canary agent session,
canaryctlwill resolve your actor identity automatically from the inherited Canary session token. - Do not invent or pass your own display name for thread or file-brief authorship.
- If the repo is using Canary for attributed agent threads, prefer being launched via
canary codexorcanary claudeso your threads and replies are tagged to the correct live actor.
Use these commands:
canaryctl todo list --jsonto see the agent's current cleanup queue. It can return items like threads waiting for an agent reply, threads waiting on the user, outdated thread anchors, and outdated file briefs.canaryctl thread list --file <path> --jsonbefore opening a new threadcanaryctl thread reply <thread-id> --body "<text>"to continue an existing discussioncanaryctl thread open <file> --start <line> --end <line> --type <decision|question|risk|scope_change> --title "<title>" --body "<text>"for one concrete review-worthy issuecanaryctl explain file <file> --summary "<summary>" [--details "<details>"]when a file's role, boundary, or invariants changedcanaryctl brief list --file <path> --jsonto inspect file-brief state for a touched file
Guidance:
- Use
canaryctlincrementally and often so the user can proactively see and respond to your design decisions. - Prefer one issue per thread.
- Open threads only for changes a human should review deliberately.
- Use briefs for durable file-level context, not diff summaries.
- Check
canaryctl todo list --jsonoften while working, not just at the end. - Keep titles and bodies concise and specific.
IMPORTANT:
- Later edits can make existing context stale.
- A thread becomes
outdatedwhen its old anchor can no longer be trusted. - A file brief becomes
outdatedwhen later edits may have made it stale. - Outdated items stay visible to the user.
- If a thread is
outdated, add a reply with the new context or open a new thread on the current lines. - If a file brief is
outdated, runcanaryctl explain file ...again with updated text. - If you are not fixing an outdated item now, leave it clearly pending; do not ignore it.