Skip to main content

Session Intelligence

All Tiers

A closed intelligence loop: your sessions end with a debrief, agents process overnight, and your next session starts with a briefing

The Intelligence Loop
Every session makes the next one smarter

Session Intelligence connects the end of one coding session to the start of the next. When you finish work, ACE captures what happened. Between sessions, agents analyze your changes. When you start again, you get a briefing of everything that was discovered.

Session Intelligence Loop

End SessionDebriefAgents ProcessBriefingStart Session
No manual work needed — hooks automate the entire cycle
Pre-Session Briefing
Start every session with full context from your agents

When you start a new coding session, the briefing hook calls the ACE API and injects agent intelligence into your AI's context. This means your AI immediately knows about contradictions found, quality issues flagged, patterns learned, and open issues — without you having to explain anything.

What the briefing includes:

Recent agent insights and risks
Unresolved issues from last session
New relationships discovered
Observations and learned patterns

API Endpoint

GET /api/v1/{namespace}/session/briefing?hours=24

Returns agent intelligence from the last N hours (1–168). Default: 24 hours.

MCP Tool

ace_session_briefing(hours=24)

Available in all MCP-compatible tools. No feature gate — works on all tiers including Free.

Post-Session Capture
Automatically log what happened in each session

The PreCompact hook runs automatically when Claude Code compacts your conversation context. It parses the transcript and creates a work log in ACE with session statistics — edits, reads, writes, and bash commands.

What it captures:

File edits, reads, and writes
Bash commands executed
Files modified (last 10)
Session ID and timestamp

Automatic: The PreCompact hook only fires on automatic compaction (when your context window fills up), not manual compaction. This ensures work logs reflect real session activity.

Session Debrief
Record a rich summary of what happened in a session

The debrief endpoint records a session summary as three entities: a work log (what was done), a memory (key learnings), and an observation (for agent processing). This gives agents maximum signal to work with between sessions.

API Endpoint

POST /api/v1/{namespace}/session/debrief

Request Body

{
  "summary": "Implemented auth middleware and wrote tests",
  "files_changed": ["src/auth.ts", "tests/auth.test.ts"],
  "decisions_made": ["Use JWT over session tokens"],
  "issues_encountered": ["CORS config needed for staging"],
  "session_id": "optional-session-id",
  "duration_minutes": 90
}

MCP Tool

ace_session_debrief(summary="...", files_changed=[...])
MCP Prompts
Pre-built prompts that wrap the intelligence loop

ACE provides two MCP prompts that wrap the briefing and debrief into ready-to-use instructions for your AI tool.

start-session

Fetches your briefing and presents it as a structured context block. Use at the beginning of any session.

start-session(project="my-app")

end-session

Guides you through recording a debrief with summary, files, decisions, and issues.

end-session(summary="...")
Setup Guide
Get the full intelligence loop running in minutes

Claude Code

1

Copy the briefing hook

cp ace-frontend/public/hooks/ace-session-briefing.sh .claude/hooks/
2

Copy the PreCompact hook

cp ace-frontend/public/hooks/precompact.sh .claude/hooks/
3

Configure hooks in settings.json

{
  "hooks": {
    "SessionStart": [
      { "command": ".claude/hooks/ace-session-briefing.sh" }
    ],
    "PreCompact": [
      { "command": ".claude/hooks/precompact.sh" }
    ]
  }
}
4

Make hooks executable

chmod +x .claude/hooks/*.sh

Other MCP Tools (Cursor, VS Code, etc.)

Use the MCP tools directly in your AI conversations:

ace_session_briefing(hours=24)
ace_session_debrief(summary="What I did this session")

Or use the MCP prompts start-session and end-session for guided workflows.

Session Manager Agent
Autonomous agent that processes session data in the background

The Session Manager is one of ACE's 10 autonomous agents. It runs between sessions (on Pro tier and above) to analyze debrief data, consolidate work logs, and prepare briefing summaries. It has elevated memory and interpersonal gene expression (MEM=1.8, INT=1.5) for better session context understanding.