Code-Council
Better code through collective intelligence.
Inspiration
Coding agents are powerful, but they repeatedly spend tokens rediscovering the same repository. They can also commit too quickly to their first solution.
I built Code-Council around two ideas: repository knowledge should be reusable, and difficult engineering decisions benefit from multiple perspectives. My goal is to bring collective intelligence to coding without multiplying cost unnecessarily.
What it does
Code-Council connects local or GitHub repositories with Codex and Claude Code.
It uses Graphify to build a structural graph of the codebase, then creates persistent repository memory that can be reused across tasks. For each request, Code-Council retrieves only the relevant files, symbols, and context instead of repeatedly sending the entire repository.
Users can run a task with Codex, Claude, or a council. For complex work, one agent proposes an approach, another critiques it, the proposal is revised, and an execution agent implements the reviewed plan. Smaller tasks use a single agent to reduce cost and latency.
Code-Council also provides:
- Parallel, persistent task conversations
- Live commands, processes, PIDs, and agent activity
- Clarification and approval requests
- Isolated Git worktrees
- Structured diff review
- Accept, decline, and request-changes workflows
- Per-task token, cost, and latency measurements
- Incremental context updates after accepted changes
How I built it
Code-Council is an application with a web-based engineering interface and a loopback service that coordinates repositories, Git operations, context generation, and coding-agent processes.
I use Graphify to build a deterministic graph of repository files, symbols, dependencies, and relationships. A selected context model then creates persistent Markdown memory describing the repository’s architecture, modules, conventions, risks, and important symbols.
When a task begins, Code-Council queries Graphify for the most relevant files and symbols. Those results are used to select a small set of relevant memory documents and produce a task-specific context capsule.
Complex tasks can use a token-conscious council sequence:
Claude proposes → Codex critiques → Claude revises → Codex executes
Execution happens inside an isolated Git worktree. The developer reviews the resulting diff before anything is applied to the connected repository.
Challenges I ran into
The hardest challenge was balancing context quality against token usage. Passing all generated memory defeated the purpose, while retrieving too little produced incomplete answers. I addressed this using Graphify-powered retrieval, relevance ranking, configurable token ceilings, and bounded follow-up queries.
Coordinating multiple CLI agents was another challenge. Codex and Claude expose different process events, model settings, usage information, approvals, and tool activity. I had to normalize those differences into one consistent workflow.
Git isolation was also important. Parallel tasks must not overwrite each other or interfere with existing local changes. Code-Council uses separate worktrees, patch preflight checks, and explicit conflict states to protect the developer’s repository.
Finally, agent output can become noisy. I separated the readable task conversation from the operational Monitor, where developers can inspect commands, processes, failures, and retries.
Accomplishments that I’m proud of
I’m proud that Code-Council is more than a multi-model chat interface. It connects persistent repository understanding, Graphify-powered retrieval, collaborative planning, real coding-agent execution, and human review in one workflow.
Highlights include:
- Graphify-based retrieval instead of repeatedly sending the whole repository
- Adaptive single-agent or council execution
- Persistent background tasks that survive browser refreshes
- Parallel task isolation using Git worktrees
- Recoverable clarification, approval, failure, and conflict states
- Transparent token, cost, latency, and context measurements
- A unified interface for conversations, code, diffs, processes, and repository memory
What I learned
More agents do not automatically produce better results. Councils are most useful when agents have distinct roles and exchange structured artifacts instead of repeatedly receiving the same prompt and context.
I also learned that persistent context alone is not enough. Repository knowledge must remain connected to its source, update incrementally, and be retrieved selectively for each task.
Most importantly, developers need control and visibility. Showing what agents are doing, what context they received, and what will change before applying a patch is essential for building trust.
What’s next for Code-Council
My next steps include:
- Benchmarking tasks with and without generated context
- Learning when council escalation improves outcomes
- Improving code review and task-scoped Git workflows
- Supporting additional coding agents
- Making incremental context updates smarter
- Expanding GitHub and pull-request support
- Exploring shared repository knowledge for teams
- Adding more configurable council strategies
I made Code-Council open source so developers can inspect how it works, add their preferred agents, experiment with Graphify-powered retrieval, and help develop better ways for coding agents to collaborate.
Built With
- codex
- git
- graphify
- node.js
- openhands
- react
- typescript
Log in or sign up for Devpost to join the conversation.