Rename agent run → agent session (new /v1 sessions surface)#21
Merged
Conversation
The backend renamed "agent runs" to "agent sessions": /v1/agents/runs is
gone, replaced by /v1/sessions (and /v1/configs, /v1/templates for what
used to live under /v1/agents/*). This CLI now speaks that surface end to
end.
- Command rename: `agent run start/list/get/replay/stop` -> `agent session
start/list/get/replay/stop`. src/commands/run.tsx -> session.tsx,
registerRun -> registerSession. All help text, hints, and human output
updated ("Start and inspect agent sessions", "started session ...",
"No sessions found.", etc). Flag names unchanged (--config,
--config-override, --prompt, --watch, --json); the config-override YAML
example keeps the literal `limits:\n run: 5` key since that field name
didn't change.
- `agent session stop <id>` is now real: POST /v1/sessions/{id}/stop,
replacing the old fail-loudly stub (no /v1 endpoint existed before).
- src/lib/api.ts: /v1/agents/runs -> /v1/sessions, /v1/agents/configs ->
/v1/configs, /v1/agents/templates -> /v1/templates. List response key
runs -> sessions. Renamed startAgentRun/listAgentRuns/getAgentRun/
replayAgentRun to their AgentSession equivalents, added stopAgentSession.
- src/lib/types.ts: AgentRun* -> AgentSession* types, added the
non-terminal `retrying` status (kept out of TERMINAL_STATUSES),
SavedAgentConfig.last_job_run_id -> last_agent_session_id (+ new
last_agent_session_created_at).
- src/lib/ws.ts: stream URL -> /v1/sessions/{id}/stream, streamRun ->
streamSession, runId option -> sessionId. Reconnect/backoff logic
unchanged.
- src/lib/urls.ts: runUrl -> sessionUrl (dashboard session detail is now
/{login}/sessions/{id}); configUrl now points at
/{login}/agents/configs/{id}.
- src/ui/RunView.tsx (dead code, imported nowhere) -> SessionView.tsx for
consistency.
- Updated all tests (session.test.ts, urls.test.ts, ws.test.ts,
api.test.ts) to the new names/paths/response keys, and README.md's
examples. This is a breaking CLI change; the old `agent run` command and
/v1/agents/runs endpoints are gone, so there is no backward-compat path.
hbrooks
pushed a commit
that referenced
this pull request
Jul 5, 2026
…ssion handoff` (stacked on #21) (#22) * Laptop transcript sync: agent hooks install/enroll + agent session sync - agent hooks install|uninstall|status: idempotently manage the Stop + SessionEnd command hooks (async, never block a turn) in ~/.claude/settings.json, preserving user-authored hooks - agent hooks enroll|unenroll: per-repo opt-in consent gate, stored in the CLI config (cwd -> origin remote -> owner/name) - agent session sync: hook-driven (stdin JSON) or manual (flags); checks enrollment (silent no-op otherwise), redacts client-side, gzips + base64, POSTs /v1/sessions/sync; network failures spool to ~/.config/ellipsis/spool (latest snapshot per CC session wins) and flush on the next healthy sync; every hook-mode failure path is a quiet exit 0 so a sync problem can never disturb a Claude Code session * agent session handoff: push WIP snapshot + start a cloud handoff session git stash create snapshots the dirty tree without disturbing it (clean tree hands off HEAD), pushed to refs/ellipsis/handoff/<sha12>; then POST /v1/sessions with handoff params + the instructions as the prompt. Requires --parent (the synced laptop session to chain from). --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
hbrooks
pushed a commit
that referenced
this pull request
Jul 5, 2026
…ssion handoff` (stacked on #21) (#22) * Laptop transcript sync: agent hooks install/enroll + agent session sync - agent hooks install|uninstall|status: idempotently manage the Stop + SessionEnd command hooks (async, never block a turn) in ~/.claude/settings.json, preserving user-authored hooks - agent hooks enroll|unenroll: per-repo opt-in consent gate, stored in the CLI config (cwd -> origin remote -> owner/name) - agent session sync: hook-driven (stdin JSON) or manual (flags); checks enrollment (silent no-op otherwise), redacts client-side, gzips + base64, POSTs /v1/sessions/sync; network failures spool to ~/.config/ellipsis/spool (latest snapshot per CC session wins) and flush on the next healthy sync; every hook-mode failure path is a quiet exit 0 so a sync problem can never disturb a Claude Code session * agent session handoff: push WIP snapshot + start a cloud handoff session git stash create snapshots the dirty tree without disturbing it (clean tree hands off HEAD), pushed to refs/ellipsis/handoff/<sha12>; then POST /v1/sessions with handoff params + the instructions as the prompt. Requires --parent (the synced laptop session to chain from). --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
hbrooks
added a commit
that referenced
this pull request
Jul 5, 2026
…ssion handoff` (stacked on #21) (#22) (#24) * Laptop transcript sync: agent hooks install/enroll + agent session sync - agent hooks install|uninstall|status: idempotently manage the Stop + SessionEnd command hooks (async, never block a turn) in ~/.claude/settings.json, preserving user-authored hooks - agent hooks enroll|unenroll: per-repo opt-in consent gate, stored in the CLI config (cwd -> origin remote -> owner/name) - agent session sync: hook-driven (stdin JSON) or manual (flags); checks enrollment (silent no-op otherwise), redacts client-side, gzips + base64, POSTs /v1/sessions/sync; network failures spool to ~/.config/ellipsis/spool (latest snapshot per CC session wins) and flush on the next healthy sync; every hook-mode failure path is a quiet exit 0 so a sync problem can never disturb a Claude Code session * agent session handoff: push WIP snapshot + start a cloud handoff session git stash create snapshots the dirty tree without disturbing it (clean tree hands off HEAD), pushed to refs/ellipsis/handoff/<sha12>; then POST /v1/sessions with handoff params + the instructions as the prompt. Requires --parent (the synced laptop session to chain from). --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The backend renamed "agent runs" to "agent sessions":
/v1/agents/runsis gone, replaced by/v1/sessions(configs/templates moved to/v1/configsand/v1/templates). This CLI is renamed end to end to speak that surface.agent run start/list/get/replay/stop->agent session start/list/get/replay/stop. All help text, hints, and human-readable output updated. Flag names are unchanged (--config,--config-override,--prompt,--watch,--json); the--config-overrideYAML example keeps the literallimits:\n run: 5key since that config field's name didn't change.agent session stop <id>is now real, callingPOST /v1/sessions/{id}/stopand printing the returned status (supports--json). It replaced a fail-loudly stub, since no/v1stop endpoint existed before./v1/agents/runs->/v1/sessions,/v1/agents/configs->/v1/configs,/v1/agents/templates->/v1/templates. The sessions list response envelope key changed fromrunstosessions.AgentRun*->AgentSession*, added the new non-terminalretryingstatus (excluded fromTERMINAL_STATUSES), andSavedAgentConfig.last_job_run_id->last_agent_session_id(plus a newlast_agent_session_created_at)./v1/sessions/{id}/stream,streamRun->streamSession; reconnect/backoff/resume logic is unchanged.{appBase}/{login}/sessions/{id}(was/{login}/agents/runs/{id}); config detail is{appBase}/{login}/agents/configs/{id}(was/{login}/agents/{id}).src/ui/RunView.tsx->SessionView.tsxfor consistency.This is a breaking CLI change: the previously-published
agent runcommand already couldn't work against the current backend (the/v1/agents/runsendpoints it called no longer exist), so there's no meaningful backward-compat path to preserve. The release tag/version bump is handled separately; this PR does not touchpackage.json's version.Test plan
bun installbun run typecheck(clean)bun run test(vitest, 108/108 passed across 10 files)bun run build(tsup, succeeds)node dist/cli.js session --help,session stop --help) to confirm the new command tree and descriptions render correctly