uac unified agent context

Docs

In the agents (MCP + hooks)

The zero-UI path — run claude and codex as usual, they read the shared layer.

The simplest way to use uac is to not change how you work at all. After uac init, running claude or codex in the project just works: they reach the shared layer through MCP tools and session hooks.

What uac init wires up

FileForWhat it does
.mcp.jsonClaude Coderegisters the uac MCP server (UAC_SOURCE=claude-code)
.claude/settings.jsonClaude CodeSessionStart + Stop hooks, tool permissions
.claude/skills/Claude Codegenerated native skill mirror
.codex/config.tomlCodexregisters the MCP server (UAC_SOURCE=codex)
.codex/hooks.jsonCodexSessionStart + Stop hooks
CLAUDE.mdClaude Codegenerated — @AGENTS.md + Claude extras
~/.agents/registry.tomlbothmakes the project linkable by name

Attribution works because each agent spawns its own MCP server process, so UAC_SOURCE is set per agent.

The two hooks

  • SessionStart injects project_context (AGENTS.md + skills index + recent memories) so the agent starts informed.
  • Stop nudges the agent to save durable facts via memory_write before it finishes. Its own model does the writing — no API key.

Run the MCP server directly

Rarely needed, but available:

uac serve            # stdio (what the agents use)
uac serve --http     # streamable HTTP, for one long-lived server

Headless / one-shot

uac run claude-code "explain what this repo does"
uac run codex "review the auth flow"
uac review "add retry logic to the client"   # Claude writes → Codex reviews the diff