Skip to content

ctx activity

ctx activity lists who has pushed to or pulled from the current repo, newest first.

Mostly to answer “did that actually land on anyone else’s machine?” — you push a page, and the feed tells you whether a teammate’s agent has picked it up yet. It’s also the quickest check that a newly-onboarded developer has their agent wired up: if they never appear, nothing on their side is pulling.

Two things it is not. It’s not a page history — for what changed in a page, use ctx history and ctx diff. And it’s not a complete audit log: no-op pulls, rejected pushes and reads all leave no trace, and only the newest 1000 events per repo are kept.

Terminal window
ctx activity [--limit <n>]
FlagTypeDefaultDescription
--limitint50Maximum number of events to show
FlagTypeDefaultDescription
--rootstringproject root directory (default: current directory)

--limit is the whole pagination story here. The server accepts an offset parameter, but the CLI always sends the newest page, so raising --limit is the only way to look further back. The server clamps the value at 500, and only retains 1000 events per repo, so the practical ceiling for one command is 500 of the newest 1000.

The default view, newest 50 events:

Terminal window
ctx activity
ctx activity
no activity yet

An empty feed on a repo you have definitely pushed to is usually one of two things: every file in that push came back as a conflict, so the server accepted nothing to record, or — as above — the server was reached with the deprecated shared --api-key, which has no user identity to attribute events to and therefore records none. Sign in with a personal access token or the browser flow (ctx login) and events start appearing.

Just the last handful, when you only care what happened this morning:

Terminal window
ctx activity --limit 5
ctx activity --limit 5
no activity yet

ctx activity reads .contexo/config.json and the stored credentials, then calls GET /v1/repos/<repo_id>/activity?limit=<n>. Any member of the repo may call it; it writes nothing locally and makes no git commit.

The rows it prints are written by the server as a side effect of sync, not by your CLI:

  • push — recorded when the server accepted at least one file. “Accepted” includes a file whose content was already identical: git reports nothing to commit, the store hands back the existing sha without an error, and the file still counts. Since ctx push uploads every local page every time, a repeat push of unchanged pages still writes a pushed row. Only a push whose files were all rejected as conflicts records nothing. The event stores the accepted paths (capped at 50) as its detail.
  • pull — recorded only when pages were actually received, so routine “already up to date” polling doesn’t flood the feed. The event stores the name the client announced in the X-Contexo-Client header: ctx pull sends ctx-cli, and the ctx_pull MCP tool sends whatever your agent gave as clientInfo.name in its MCP handshake — that’s where names like claude-code or cursor come from. Pushes carry no client name.

Each event is stored against the user id of whoever authenticated, and the email you see is joined from the server’s user table at read time. That is the account email, not the git author on the commit — which can differ, because ctx push sends its own author name and email for the commit.

Retention is enforced on write: every insert prunes the repo’s feed back to its newest 1000 events, so an old event disappears the moment a new one takes its place. Recording is best-effort — if the write fails the push or pull it belongs to still succeeds.

Message What happened
activity: not authenticated — run 'ctx login' first No credentials in this project. See ctx login.
activity: server URL not set — run 'ctx remote set <url>' first Config has no server. See ctx remote.
activity: repo id not set — run 'ctx remote set-repo <id>' first The project isn’t pointed at a repo yet.
sync: list activity (403): {"error":"not a member of this repo"} Your account isn’t on this repo. Redeem an invite key with ctx join.
  • ctx members — who can produce these events
  • ctx log — the commit-level view of the same repo
  • ctx pull — what makes a pulled row appear
  • Teams guide — how a team uses the feed day to day