Docs
See what follows you to this machine
Continuity is one screen over readers RepoOps already has: your Claude Code sessions on every device bound to this brain, the newest lessons across every tracked repo, and the running cost with each dollar tied to the session, repo and merged pull request that spent it. The first line says whether the brain in front of you is local-only or when it last synced.
For: the engineer who works from more than one machine or more than one repo, and the owner who wants one answer to what the AI work cost
What it does, and why it helps
The tab reads GET /api/continuity, which composes existing readers and adds no store of its own. The sessions card is the same snapshot the Active sessions tab renders, rolled up per device: local rows plus the presence events other machines pushed, with a session counted live for 90 seconds after its last turn and dropped from the snapshot after an hour. The lessons card is each tracked repo's active lessons, flattened, newest first, capped at twelve. The ledger is the Anthropic Admin API total when a key is configured and the App-LLM tracked spend per repo from each repo's .claude/brain/ai-calls/*.jsonl.
Three more cards join that spend to work. Cost, attributed splits it per session, per repo and per prompt pattern, with a confidence figure that is the share of spend carrying a real session id. Cost per merged PR joins sessions to pull requests merged in the last 14 days by file overlap, splitting a session that touched several pull requests by its share of files; spend it cannot tie stays in an unattributed bucket. Dollars saved by prevented recurrences prices each prevention event through its lesson, the lesson's causal link and that session's tracked cost, and counts the rest as unpriced. The page refreshes every five seconds and paints the last view first on reopen.
The pain. You open a second laptop, or a second repo, and cannot tell whether the brain came with you, which session you left running where, or what the week's agent work cost once it was spread across four tabs.
The point of view. Read the freshness first, then the evidence. A lesson from another machine is only worth trusting once the sync line says the brain in front of you is current, and a cost figure is only worth quoting when the tab says how much of it was tied to real work.
What gets easier. Orientation. One screen shows each device with its session count, repos and a jump to that device's rows; the newest lessons across every repo; and the ledger with billed against tracked, cost per merged pull request with a strong or likely label, and what was left unattributed.
When it helps. Any machine running the RepoOps desktop app with at least one tracked repo. The cross-device rows need either hosted cloud sync or the git brain sync turned on; the billed total needs an Anthropic Admin key; the rest works local-only.
Its limits. It shows, it does not change anything: no setting lives on the tab. Cloud sync is off by default, so a fresh install reads Local-only until you opt in. The conflict flag says another machine advanced the sync cursor; it does not merge, and the merge lands in .claude/brain/proposed/ for review. Cost figures are zero, not estimated, where the rows are missing, and a session without resolvable files stays unattributed rather than being matched to a pull request.
Understand it in 30 seconds
Read the narration
- 0:00 You open a second laptop.
- 0:02 Did the brain come with you?
- 0:06 RepoOps says which it is.
- 0:08 Local-only, or last synced three minutes ago on this machine.
- 0:13 One screen: sessions per device, the newest lessons, and cost tied to the merged pull request that spent it, with its confidence.
- 0:23 Cost it cannot tie to work stays unattributed.
- 0:26 Read the sync line first.
Synthetic example. Read the guide
Where to find it
Where to find it
- Desktop:
localhost:4000, then Memory in the sidebar, then Continuity under All tools, in the Lessons, wiki and patterns group. - Hosted: desktop only.
- Keyboard: ⌘ K, then type “Continuity”.
When to use it
Opening the lid on a second machine
Situation. Hosted cloud sync is on, this device is bound to the team, and you left a session running on the desktop at the office.
What you do. Open Continuity. Read the sync line. In Sessions across devices, find the other device's row and follow open on that device.
What you see. The line reads Brain last synced 3m ago on this machine. The other device's row shows its session count, its repos and how long ago its latest turn was, with a live badge if the last turn was inside 90 seconds. This machine's row carries the badge this machine and the link resume here.
What it establishes. You know the brain here is current to within about an hour and which device holds the live session. If the line instead reads Cloud sync ON · not yet synced on this machine, nothing has been pulled here yet; run npx repoops connect or wait for the next sync, once an hour on the hour.
Answering what a merged pull request cost
Situation. A tracked repo has Claude Code sessions with tracked cost and pull requests merged inside the last 14 days.
What you do. In Cost per merged PR, read the headline avg cost / merged PR and the confidence line, then expand a pull request row.
What you see. The row shows PR, Title, Cost, Sessions, Files and a Confidence chip that reads strong when every contributing session maps to this pull request alone, or likely when a session also touched another and its cost was split by file overlap. The expanded drawer lists each session with its share and its overlap out of files touched, and links to App-LLM calls and Telemetry.
What it establishes. A per-pull-request figure with its join terms visible. Spend that no pull request's files explain sits in the unattributed count on the confidence line; it is never pushed onto the nearest pull request.
Before you start
- Supported versions
- RepoOps desktop v0.3.1, the release this guide was read against. Sessions come from the Claude Code capture files under each tracked repo; cross-device rows need the sync channel below.
- Where it runs
- Local: the Continuity tab. Hosted: /team/continuity renders a desktop-only stub that says the per-developer unification is not streamed to the team database and points to Team brain and Telemetry instead.
- Permissions
- Reading the tab needs nothing beyond the local dashboard. Turning hosted cloud sync on or off, and saving a git brain-sync remote, each take this machine's operator confirmation on the Settings write.
- Connections
- Optional, each independent: a team binding under Connect to team for hosted cloud sync; a git remote you control for the credential-free brain sync; an Anthropic Admin key (ANTHROPIC_ADMIN_KEY in the data directory's .env, or Connect Anthropic account on the Billing Guard tab) for the billed total.
- Plan
- No plan gate was found in lib/routes/continuity.mjs or the modules it calls. The hosted route is a stub on every tier.
Configure it
- Track the repos whose work should follow you.
Every card reads per tracked repo: sessions, lessons, ai-calls rows and merged pull requests. A repo that is not tracked contributes nothing, and the tab does not say so.
- Open Continuity and read the sync line.
Local-only · cloud sync off is the default and a valid state. The other four states are Cloud sync ON · not yet synced on this machine, Brain last synced Nm ago on this machine, Cloud sync ON · last pull failed with the error in brackets, and a conflict flag that says another machine edited the brain · review the merge in .claude/brain/proposed/.
- Pick a cross-machine path, or stay local.
Settings, Cloud sync (hosted): tick Enable hosted cloud sync, which needs the device bound under Connect to team and pushes and pulls the redacted event store with repoops.ai once an hour, on the hour. Or Settings, Brain sync across machines (free, via git): enter Git remote (your own repo URL) and Branch (default repoops-brain), press Save, then Push brain here and Pull brain on the other machine; once a remote is saved the tick pulls then pushes on its own.
- On a new machine, run npx repoops connect once.
It reads the device binding, pulls this team's tail from repoops.ai and prints how many events arrived and when the brain was last in sync. With cloud sync off it prints Cloud sync is not enabled for this account. and exits 0; with sync on but no binding it tells you to connect from the Settings tab first.
- Add the Admin key if you want the billed total.
Until then the ledger's first figure reads billed · set ANTHROPIC_ADMIN_KEY and the tracked (App-LLM) figure still shows. The key from the environment always wins over one stored from the Billing Guard tab, and the report is memoized for five minutes.
- Read the cost cards with their confidence.
Cost, attributed says what share of spend carried a session id. Cost per merged PR says what share was tied to a pull request and how many sessions stayed unattributed. Dollars saved says how many prevention events it priced out of how many recorded.
| Setting | Where | A sensible choice | Why it matters |
|---|---|---|---|
cloudSync | Settings, Cloud sync (hosted), Enable hosted cloud sync | off (the default) until you want the brain to follow you through repoops.ai | Decides the sync line and whether the hourly sync pushes and pulls. A team-bound device with a device token reads as on even when unset, unless the account opts out below. On by that team default, it pushes only repositories you accepted your team's managed policy for; turning it on yourself, with Send every tracked repository on the card, pushes them all. |
teamCloudSyncDefault | account-settings.json, no desktop control | unset | false opts a team-bound device out of the team default; the explicit tick above still wins. |
gitSync.<repoId>.remote and .branch | Settings, Brain sync across machines (free, via git) | a remote you own, branch repoops-brain | The credential-free path. A row with no remote is dropped on Save, which is how you turn it off. Only .claude/brain/ travels. |
ANTHROPIC_ADMIN_KEY | the data directory's .env, or Connect Anthropic account on Billing Guard | set when you want billed against tracked | Without it billing.configured is false and the drift line does not render. The env value takes precedence over the stored credential. |
PER_MERGED_PR_WINDOW_DAYS | server.mjs constant, no control | 14 (fixed) | A session counts toward a pull request only if it started inside the window before the merge and ended before it. |
What you should see
Local-only, one machine
Configuration. A fresh install with tracked repos, cloud sync unset, no git remote, no Admin key.
Expect. The line reads Local-only · cloud sync off. Sessions across devices shows one row with the badge this machine. The ledger reads billed · set ANTHROPIC_ADMIN_KEY beside the tracked (App-LLM) total and a Repo, Tracked $, Calls table.
Verify. GET /api/continuity returns cloudSync.mode local-only and cost.billing.configured false. The lessons card lists the newest active lessons across repos, or No lessons yet across your repos.
Cloud sync on, two machines
Configuration. Enable hosted cloud sync ticked on both machines, both bound to the same team, at least one pull completed here.
Expect. The line reads Brain last synced Nm ago on this machine. The other machine appears as its own device row with an open on link. If the last pull advanced past this device's cursor, the conflict flag appears beside the line.
Verify. The cursor file .claude/brain/sync/cursors/<teamId>.json carries lastPulledAt and lastBatch; lastBatch.advanced true is the conflict, lastBatch.error is the failed state. npx repoops connect prints Connected. Pulled N events from the account rollup.
Admin key set
Configuration. Any of the above with ANTHROPIC_ADMIN_KEY in the data directory's .env.
Expect. The ledger's first figure reads billed (Admin API). Cost, attributed adds the line tracked vs billed drift with a signed percentage, computed as tracked minus billed over billed.
Verify. cost.billing.configured is true and billedUsd is a number. If the Admin call fails, configured stays true with an error and the billed figure falls back to a blank, never a zero.
Data and cost
- What is captured
- Nothing new. The route reads rows other features wrote: Claude Code capture files and presence events for sessions, lessons/lessons.jsonl and prevention-events.jsonl per repo, ai-calls day files per repo, merged pull requests from git history, and the per-team cursor files under .claude/brain/sync/cursors/.
- Who can see it
- Local. The tab is served by the desktop app to this machine, and the hosted /team/continuity page is a stub that says the unification is not sent to the team. What crosses machines is the sync channel you chose, not this page: hosted cloud sync moves the redacted event store (counts, timings, paths), and git brain sync moves .claude/brain/ to your own remote.
- How long it is kept
- Presence rows leave the snapshot one hour after their last turn and the reader looks back two day files; the merged-pull-request join looks back 14 days; the lessons card shows the newest twelve. None of the continuity modules holds a retention knob for the ai-calls day files, the lessons file or the events files; lessons are invalidated, never deleted.
- What leaves the machine
- With an Admin key, each uncached load calls the Anthropic Admin API for the cost report on that key. With hosted cloud sync on, the hourly sync and npx repoops connect fetch www.repoops.ai/api/events/since with this device's token and push in the other direction. With git brain sync on, the tick pushes .claude/brain/ to the remote you set. Otherwise nothing leaves the machine.
- What it costs
- No model call. The figures are sums over rows that already carry their cost; the Admin API request is a report read, not inference. The join memoizes for five seconds and the Admin report for five minutes, so a page left open costs a local read every five seconds.
When the result differs
| Symptom | Likely cause | Next action |
|---|---|---|
| The line reads Local-only · cloud sync off after you turned sync on. | The effective state needs cloudSync true, or a team binding with a device token and no team opt-out. | Check Connect to team in Settings, then re-tick Enable hosted cloud sync; the tab re-reads on the next five-second poll. |
| Cloud sync ON · not yet synced on this machine. | No cursor file exists here yet; no pull has completed. | Run npx repoops connect in the repo, or wait for the next hourly sync. |
| Cloud sync ON · last pull failed, with a reason in brackets. | The most recent batch recorded an error in the cursor file; the cursor was left unchanged. | Read the reason. The next tick retries; npx repoops connect exits 1 and prints the same reason. |
| The conflict flag appears beside the line. | The last pull advanced past this device's cursor: another machine pushed events this device had not seen. | Review the merge in .claude/brain/proposed/. Nothing is auto-merged into the canonical brain. |
| Cost per merged PR reads Cost exists but could not be tied to files this window. | Sessions in the window carry cost but no resolvable files_touched, or no file overlaps a merged pull request's files. | Open the session on Telemetry and check its files. The figure stays in the unattributed bucket until the join can see an overlap. |
| Cost, attributed reads No attributable App-LLM cost yet. | Tracked calls carry no session id, repo or prompt preview, so nothing can be joined. | Check the ai-calls rows on App-LLM calls for a session_id field; only tagged rows join. |
| Prevented recurrences recorded, but none could be priced yet. | The lesson has no causal link to a session, or that session's cost is not tracked. | Nothing to fix on this tab; the count stays visible as unpriced and no dollar figure is invented. |
| The header reads Failed to load. | GET /api/continuity returned an error; the message follows the words. | Read the desktop app's log for the [repo-dashboard] line; the last good view stays on screen from the cache. |
- Disable
- Untick Enable hosted cloud sync, or clear the git remote and Save, or remove the Admin key. Each returns its own part of the page to the local-only or unconfigured state; the tab itself has no switch.
- Roll back
- Not provided. The tab writes nothing, so there is nothing of its own to undo. Events a pull appended to .claude/brain/events/<day>.jsonl are append-only and no route removes them; a brain the git sync pulled over .claude/brain/ is a plain copy, and git on your remote holds the prior commit.
- Revoke access
- Device binding: disconnect in the desktop app forgets the binding and revokes the device token on the server, which stops the pull. Admin key: DELETE /api/provider-credentials removes the stored credential; an environment key has to be removed from .env.
- Delete
- Not provided. No route deletes the rows this page reads. They sit in each repo's .claude/brain/ai-calls/*.jsonl, lessons/lessons.jsonl, lessons/prevention-events.jsonl and events/*.jsonl, and in the cursor files under .claude/brain/sync/cursors/.
Related tasks
Maintenance evidence
- Feature id
continuity(spine leafcontinuity)- Owner
- Continuity program (WS-B to WS-D of docs/plans/cross-everything-continuity.md, plus the WS4 cost-per-merged-PR join and the A1 and A2 cost-proof cards). Guide: LDG-0717.
- Supported product version
- RepoOps v0.3.1
- Last verified
- 2026-09-15, read against origin/main at 52366bb6d; labels read from the served tab source (public/continuity.html and public/settings.html), the route from lib/routes/continuity.mjs, the hosted stub from website/app/team/(home)/continuity/page.tsx. Not run on a live instance in this slice.
- Example fixtures
- No fixture file. lib/routes/continuity.cost-attribution-wiring.test.mjs drives GET /api/continuity/cost over an inline ai-calls fixture; lib/continuity/continuity.test.mjs, connect.test.mjs and cost-attribution.test.mjs cover the per-device rollup, the five sync states, the merged-pull-request split and the measured-savings join with inline rows.
- Source references
lib/routes/continuity.mjs,lib/continuity/continuity.mjs,lib/continuity/connect.mjs,lib/continuity/cost-attribution.mjs,lib/continuity/brain-sync-tick.mjs,lib/presence/projector.mjs,lib/presence/reader.mjs,lib/sync/cloud-puller.mjs,lib/account-settings.mjs,lib/anthropic-billing.mjs,lib/ai-calls.mjs,lib/lessons.mjs,lib/brain-git-sync.mjs,bin/repoops-init.mjs,server.mjs,public/continuity.html,public/settings.html- Documentation review
- Independent review requested on the slice pull request; not yet recorded.
- Video review
- Story script written 2026-09-15; render and review pending in the same slice.
Last updated