JEFF / crew
CLAUDE.md1 starsChanged 3 months agoMITView on GitHub
Manages Orchestrator and Session records in SQLite (jeff.db). Controls worker lifecycle via tmux panes/windows.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- crew/AGENTS.mdAGENTS.md
- hooks/AGENTS.mdAGENTS.md
- memory/AGENTS.mdAGENTS.md
- persona/AGENTS.mdAGENTS.md
- skill/AGENTS.mdAGENTS.md
- tui/AGENTS.mdAGENTS.md
- workspace/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- embed/CLAUDE.mdCLAUDE.md
- hooks/CLAUDE.mdCLAUDE.md
- memory/CLAUDE.mdCLAUDE.md
- persona/CLAUDE.mdCLAUDE.md
- skill/CLAUDE.mdCLAUDE.md
- tui/CLAUDE.mdCLAUDE.md
- workspace/CLAUDE.mdCLAUDE.md
- provider-integrationSkill
The file
Files
crew/ — Multi-agent orchestration
Manages Orchestrator and Session records in SQLite (jeff.db). Controls worker lifecycle via tmux panes/windows.
Types
- Orchestrator — tmux session running the orchestrator agent
- Session — worker agent in a tmux window, tied to a gig task
- Message — stored in the inbox and delivered to the worker's tmux pane
- Store — SQLite-backed store (
jeff.dbin JEFF_HOME)
File roles
| File | What it does |
crew.go | Core types, DB schema, Store open/close, migrations |
lifecycle.go | Start/Stop/Send/Capture — all state mutations |
tmux.go | Tmux primitives (HasSession, SendCommand, NewWindow) |
cleanup.go | Reconcile DB sessions against live tmux windows |
Key behaviors
- DB:
modernc.org/sqlite(no CGO), file:$JEFF_HOME/jeff.db - Session status flow:
starting → running → done / failed / stopped Send()stores the message in the inbox then delivers it to the worker's pane. Passinterrupt=trueto Ctrl-C the agent before delivery.- SendCommand splits paste + Enter into two separate tmux calls (paste must complete before Enter) — includes a 500ms delay for Gemini agent compatibility
- Cleanup = mark DB sessions failed if tmux window gone (not vice versa). Kill rules:
- Kills a window ONLY if it has no DB row AND its pane is dead (remain-on-exit leftover). A live pane is NEVER killed — a DB↔tmux mismatch (renamed window, diverged JEFF_HOME, start race) must not take down running workers.
- Refuses the orphan sweep entirely when the DB has zero sessions and zero orchestrators (
SkippedNoState) — that's a wrong-DB signal, not a garbage signal. - A
list-windowserror for a session skips that session (no stale-marking, no kills) — same transient-probe rule as Refresh (gig-0c51).
- Refresh() validates both worker and orchestrator tmux sessions
- Tests use in-memory SQLite (
:memory:)
Extending
- New message behavior: add delivery logic in
lifecycle.go - New session field: add to Session struct, update CREATE TABLE in
crew.go, add migration - New tmux op: add to
tmux.go— all tmux interaction goes through this file
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

