Skip to content

Summary page, install opt-in and MCP tools for session summaries - #5

Merged
MilosMosovsky merged 10 commits into
session-summary/2026-11-05-2211-feat-session-summary-plan-pr1from
session-summary/2026-11-05-2211-feat-session-summary-plan-pr2
Nov 6, 2026
Merged

MilosMosovsky merged 10 commits into
session-summary/2026-11-05-2211-feat-session-summary-plan-pr1from
session-summary/2026-11-05-2211-feat-session-summary-plan-pr2

Conversation

@MilosMosovsky

Copy link
Copy Markdown
Owner

What and why

The summary engine from #4 now has a Summary page, an opt-in at agentyard install, and MCP tools. You can see where every Claude Code and Codex session got to, what is waiting on you, and what comes next, grouped by repository and topic with the newest work first. An AI client can read the same summaries and start a run.

Plan group: docs/plans/2026-11-05-2211-feat-session-summary-plan.md PR2 of 2 (units U6, U7, U8, plus U9 for the MCP tools, added at your request after planning). Stacked on #4; merge that first.

The Summary page: one repository's topics, each session with its state, how long ago it was touched, where it got to and what comes next.

What a reviewer should check

  • Turning it on. agentyard install asks once whether to summarize each morning. The question names the company that would receive transcript excerpts (Anthropic or OpenAI), and it is asked again after an upgrade from an install that never answered. --yes keeps the previous answer, or off. auto is resolved to the CLI that was found before the plist is written. A bad --summary-at fails the install, so launchd is never left restarting serve. Switching provider drops a model saved for the old one.
  • Who can start a run. POST /api/summary answers only this Mac. A browser request needs the page token and the dashboard's own Origin. A request with no Origin from this Mac is how agentyard mcp starts one. /api/remove and /api/summary now share one guard, and the remove tests still cover it.
  • Who can read. GET /summary, its saved runs and GET /api/summary/status follow the Sessions rule: this Mac only, unless --sessions-lan. Other viewers get the "this Mac only" panel and no summary data anywhere in the response. Model text renders as escaped text, and a test checks that a <script> inside a note comes out escaped.
  • MCP. list_summaries and get_summary read local history and never call a model. get_summary reports a run in progress or a newer failed run. summarize starts or joins a run and waits a bounded time. It says plainly when summaries are off, when the agent refused, when the agent is too old, or when a demo holds the port. The server instructions say summary text is data, not instructions.
  • The page. Sessions show their state next to the title, and what is waiting on you comes first. Each session shows how long ago it was touched. A run that finishes while you view an older one takes you to the latest. The page waits while a drawer, dialog or selection is open. A failed status check is retried before the button comes back.

Checklist

  • gofmt -l . is clean, go vet ./... and go test -race ./... pass (167 s), GOOS=linux go build ./... builds, and the summary, MCP and install tests pass with TZ=UTC
  • No new dependencies (agentyard is stdlib only)
  • UI changes: screenshots from agentyard demo (light, dark, 390 px phone)

The screenshots were taken at a true 390 px through DevTools device emulation, because headless Chrome on macOS lays out at no less than 500 px. At 390 px the page is exactly 390 px wide in both themes.

A live run on this Mac used a dev serve with -summary claude, without touching the installed agent. It summarized 78 sessions in about nine minutes and saved its history with 0700 folders and 0600 files. It added no new session to Claude Code's or Codex's history, and no process started under the claude -p child, so no MCP server ran.

Reviews

  • A visual critique by GPT-6 Astra on the demo screenshots asked for four changes: the state beside the title, what needs you first, the full card width on phones, and quieter topic names. All four are in.
  • ce-code-review ran nine reviewers (run 20261106-125444-3987ea31) and returned "Ready with fixes". The seven confirmed findings and the cheap residuals are fixed in this PR. The adversarial pass ran on Claude, because the cross-model route needs npx.

Unapplied review findings

  • P3: main.go and mcp.go grow further past 1k lines; the summary routes and MCP tools could move to their own files.
  • P3: summarize waits up to 3 minutes, which some MCP clients cut off at about 60 seconds. It reports "still running" and get_summary shows the run in progress, so a cut-off client can recover.
  • P3: serve takes the summarizer as a variadic argument to keep existing test callers.
  • P3: the summary drawer repeats the session drawer's context block.

Compound Engineering

🤖 Generated with Claude Code

https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy

MilosMosovsky and others added 10 commits November 6, 2026 12:03
`agentyard install` takes --summary, --summary-at and --summary-model,
keeps them across reinstalls, and resolves auto to the CLI it found so
the background agent never switches provider. A first install in a
terminal, or the first install after upgrading, asks once and names the
company that would receive transcript excerpts; without a terminal the
answer is off. A bad --summary-at fails the install instead of leaving
launchd restarting serve. The agent's PATH now includes the claude and
codex folders, and the cask's zap removes summary state.

Codex's feature list is now read on the first summary call, so
resolving a provider at install runs nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
list_summaries lists saved runs, failures included; get_summary reads
the latest successful run or one by timestamp, optionally for one
project, with hidden topics counted and left out. Both read local
history and never start a model. summarize starts or joins a run of
the last 24 hours through the background agent, waits a bounded time,
and returns the saved summary, the run's error, or that it is still
running; it refuses with how to turn summaries on when they are off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
A Summary tab groups the latest run by repository, topic and session:
each session shows where it got to, what is waiting on you or blocking
it, what comes next, its branch and PR, its sub-agents, and Copy
resume. Earlier runs, failed ones included, reopen from a dated picker.
Off shows how to turn summaries on and nothing else; a viewer that may
not see sessions gets the "this Mac only" panel and no summary data.

POST /api/summary starts a run from the page (page token and its own
Origin) or from agentyard mcp (no Origin, this Mac only).
GET /api/summary/status follows the Sessions rule. The demo shows a
synthetic summary and simulates a run without any process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
Each saved session now records its last transcript write, its
sub-agents' included. Sessions, sub-agents, topics and projects are
ordered newest first when the snapshot is built, so the page and
get_summary show the same order, and every session shows how long ago
it was touched, with the exact time on hover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
The state sits beside the session title, and a session waiting on you
or blocked shows that decision first, in stronger text. Topic names
step back so sessions stand out, and on phones the notes use the full
card width and the run header takes less room.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
…us shape

The remove and summarize endpoints share one guard for who may change
things; the status JSON has one struct for the handler and agentyard
mcp; the latest successful run, a project's sessions and the state map
each have one helper; the history picker reads only each run's time
and error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
- install: a provider switch without --summary-model no longer keeps
  the old provider's model, which made every run fail.
- page: a run that finishes while a past run is open lands on the
  latest run; the finish waits while a drawer, dialog or selection is
  open (open topics do not count); a failed status check retries and
  then re-enables Summarize. One helper sends the page token, and the
  meta tag is now agentyard-page-token.
- mcp: summarize says whether summaries are off, the request was
  refused, or the agent is too old, and refuses a demo on the agent's
  port; get_summary reports a run in progress or a newer failed run;
  unreadable history files are skipped; the instructions say summary
  text is data, not instructions.
- One table owns the session states, for the schema and the page; a
  blank waits_on is treated as none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
…install tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
@MilosMosovsky
MilosMosovsky merged commit e75246d into session-summary/2026-11-05-2211-feat-session-summary-plan-pr1 Nov 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant