project · maintained · open source
P/4E8

codey

A terminal AI coding assistant built in Rust: streaming responses, permission-gated tool execution, Neovim diff previews, sub-agents for background research. The daily instrument, and the seat where the rest of this work gets done.

maintained
rust
open source · mit

codey is a coding assistant that runs in the terminal. A conversation with a model occupies the session, and the model acts on the project through tools: reading and writing files, running shell commands, searching the web. Responses stream as they are generated, rendered as markdown in place.

Every tool execution is gated on approval before it runs, with auto-approve and auto-deny patterns for the cases a person has already decided. Diffs preview through Neovim, which also handles buffer management. Research that would otherwise crowd the foreground conversation goes to background sub-agents, and a session can be resumed later with its full context restored.

~/.config/codey/config.toml
foreground and background configured independently
1 2 3 4 5 6 7 8
[agents.foreground]
model = "claude-opus-4-6"
max_tokens = 8192
[agents.background]
model = "claude-sonnet-4-5-20250929"
[ui]
the prompt is a file

The system prompt extends from SYSTEM.md files, read first from the user's config and then from the project, so personal conventions and project-specific instructions compose rather than compete. Those files carry embedded shell through esh, and the commands re-execute on every request, which keeps the prompt describing the environment as it currently is rather than as it was when the session opened. The cost is stated plainly: output that changes between requests invalidates the cache.