<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Serhii Troian</title>
    <description>The latest articles on DEV Community by Serhii Troian (@serhii_troian_getorigin).</description>
    <link>https://dev.to/serhii_troian_getorigin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4032541%2F43351e0a-0cca-4592-883f-63c50d98f7a6.png</url>
      <title>DEV Community: Serhii Troian</title>
      <link>https://dev.to/serhii_troian_getorigin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/serhii_troian_getorigin"/>
    <language>en</language>
    <item>
      <title>Switching AI Agents Without Starting Over</title>
      <dc:creator>Serhii Troian</dc:creator>
      <pubDate>Mon, 31 Aug 2026 18:51:51 +0000</pubDate>
      <link>https://dev.to/serhii_troian_getorigin/switching-ai-agents-without-starting-over-2e59</link>
      <guid>https://dev.to/serhii_troian_getorigin/switching-ai-agents-without-starting-over-2e59</guid>
      <description>&lt;p&gt;A note the last session leaves in your repo, so the next one — any vendor — knows where the work stood&lt;/p&gt;

&lt;p&gt;We build Origin, an MIT-licensed CLI that runs alongside AI coding agents and records each session into the repository itself. This is how one part of it works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The note the last session left&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI coding agents — Claude Code, Cursor, Codex and the rest — work in sessions. You open one, you work, you close it, and everything it understood about the task is gone. The next session starts blank. If you switch to a different agent it starts blanker still, because none of them can read each other’s history.&lt;/p&gt;

&lt;p&gt;Here is the exception. This was sitting in an agent’s context window one morning, before anyone typed anything:&lt;/p&gt;

&lt;p&gt;Previous session context (claude-code, 18h ago):&lt;br&gt;
Summary: Diagnosis is solid. It's not Origin's code — it's CPU&lt;br&gt;
  starvation from the host.&lt;br&gt;
Last prompt: "Origin is slow again, debug what's the issue"&lt;br&gt;
Changes: +6774 -308 lines&lt;/p&gt;

&lt;p&gt;Nobody pasted that in. Nobody asked for it. The session that produced it had ended eighteen hours earlier and wrote it to a file on the way out. When the next session started, that file was read and rendered into its prompt before the first instruction arrived.&lt;/p&gt;

&lt;p&gt;So the agent opened already knowing where things stood — which branch, which files were unfinished, what the last instruction had actually been. That is the entire feature. The rest of this article is about why the block is that short.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. What it is like without one&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You spent Friday afternoon on something nasty. Three files half-rewritten, a branch you named in a hurry, a fix that worked but needed one more case handled. You closed the laptop.&lt;/p&gt;

&lt;p&gt;Monday you open your agent and type “ok let’s finish this.”&lt;/p&gt;

&lt;p&gt;It has no idea what “this” is. So the first ten minutes go to reconstruction: which branch, which files are dirty, what the goal was as opposed to the last thing you typed, what you already tried and rejected. You are briefing a new hire who was in the room on Friday and remembers none of it.&lt;/p&gt;

&lt;p&gt;Then make it worse in the way that is now normal — on Monday you open a different agent. Friday was Claude Code; today you want Cursor, or Codex, or whatever shipped a better model last week. Each keeps its history in its own directory in its own format, and none of them read each other’s. There is no shared storage even in principle.&lt;/p&gt;

&lt;p&gt;This is not an edge case. People pick an agent per task, not per project, and the switching cost is paid in re-explanation every single time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Seeing it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The note lives at .git/origin-handoff.json. You can read exactly what is stored and exactly what the next agent will be given:&lt;/p&gt;

&lt;p&gt;$ origin handoff show&lt;/p&gt;

&lt;p&gt;Cross-Agent Handoff Context&lt;/p&gt;

&lt;p&gt;Agent:    claude-code&lt;br&gt;
  Model:    claude-opus-5&lt;br&gt;
  Session:  7f3776c8&lt;br&gt;
  Ended:    18h ago&lt;br&gt;
  Branch:   fix/prompt-capture-window&lt;/p&gt;

&lt;p&gt;Last prompt:&lt;br&gt;
  "the turn count is still wrong on merge commits"&lt;/p&gt;

&lt;p&gt;Files in progress (3):&lt;br&gt;
    packages/cli/src/git-capture.ts&lt;br&gt;
    packages/cli/src/session-state.ts&lt;br&gt;
    packages/cli/src/commands/hooks.ts&lt;/p&gt;

&lt;p&gt;Changes: +212 -47 lines&lt;/p&gt;

&lt;p&gt;Open TODOs:&lt;br&gt;
    - handle the squash-merge case in the same pass&lt;/p&gt;

&lt;p&gt;Context that will be injected into next agent session:&lt;br&gt;
  ──────────────────────────────────────────────────&lt;br&gt;
  ...&lt;br&gt;
  ──────────────────────────────────────────────────&lt;/p&gt;

&lt;p&gt;origin handoff clear throws it away if you would rather start clean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. What gets carried&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every field earns its place by answering a question you would otherwise have to answer yourself.&lt;/p&gt;

&lt;p&gt;Two properties matter more than the schema.&lt;/p&gt;

&lt;p&gt;It is written at the end of every turn, not at session end — so an agent that crashes, is killed, or is closed without ceremony still leaves a current note behind.&lt;/p&gt;

&lt;p&gt;And agentSlug is written by one agent and read by another. That is what makes it cross-vendor: a Cursor session’s note is read by a Claude Code session, and says plainly that it came from Cursor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The hard part is what it refuses to carry&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is where a feature like this is won or lost. Each rule below exists to prevent a specific bad experience, and each costs the feature something on purpose.&lt;/p&gt;

&lt;p&gt;Not the transcript. There is a permanent temptation to make the note bigger — the whole conversation, every file read, all the reasoning. Every version of that makes it worse. The value is that the next agent reads it completely before starting work. A 40,000-token history does not get read, it gets skimmed, and skimmed context is how an agent confidently resumes the wrong task.&lt;/p&gt;

&lt;p&gt;Not a session where you only talked. Ask your agent a question — “what’s in this repo’s history?” — and it answers. No files changed, nothing written. If that session overwrote the note, Friday’s real work-in-progress would be replaced by Monday’s idle question, and the next agent would open oriented around nothing. So a session that touched no files and changed no lines never replaces one that did.&lt;/p&gt;

&lt;p&gt;Not its own output, fed back. Origin already injects context at session start. Ask an agent about that context and its answer is a recap of the injection. Store the recap as the session summary and the next session injects it, the agent after that recaps the recap, and within days the note is a description of a description of something that was once actual work. So the feature recognises text that is its own prior output and refuses it — on read as well as on write, which means a repo that already picked one up heals itself the next time it is read.&lt;/p&gt;

&lt;p&gt;Not everything you say, as a commitment. Open TODOs are the highest-leverage field and the most dangerous, because a TODO is injected into every future session until it is resolved.&lt;/p&gt;

&lt;p&gt;“We should refactor the retry logic” is a commitment. “We need to switch the gh user, but switch it back after” is an instruction for right now.&lt;/p&gt;

&lt;p&gt;If the extractor cannot tell those apart, you get an agent that keeps trying to switch your GitHub user next week, for reasons nobody remembers. So extraction is anchored to actual development verbs (fix, add, refactor, migrate, handle…) and rejects hedged phrasing (I think, maybe, for now, never mind). Both rules deliberately match less.&lt;/p&gt;

&lt;p&gt;That inversion is the most transferable idea here. In an ordinary data pipeline you tune an extractor toward recall, because a false positive is just a bad row somebody filters later. When the consumer is a language model, a false positive is an instruction that a capable system will act on, repeatedly, until a human notices. The cost is unbounded and nearly undetectable, because a plausible-looking TODO is indistinguishable from a real one.&lt;/p&gt;

&lt;p&gt;Not stale state. A note older than 24 hours is not injected at all. In-progress state decays fast: a day-old list of “files in flight” probably describes files since committed, reverted, or rewritten by someone else. Confidently wrong context is worse than none, because the agent has no way to know it should distrust what it was handed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. It lives in .git, and that is a decision about you&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;.git/origin-handoff.json is not a committed file. It never appears in a diff, never shows up in a pull request, never lands in a teammate’s clone. It is scoped to your checkout, the way .git/HEAD is. Three consequences worth knowing before turning it on:&lt;/p&gt;

&lt;p&gt;Nothing leaks into review. Your last prompt — however you phrased it at 7pm on a Friday — is not going in front of your team.&lt;br&gt;
It does not sync. A colleague pulling your branch gets your code, not your note. Origin has a separate mechanism for metadata meant to travel between machines; this deliberately is not it.&lt;br&gt;
You can inspect and delete it with ordinary tools. It is JSON on disk. cat it, rm it, or use origin handoff show and origin handoff clear.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. What it cannot do&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It cannot arbitrate between simultaneous sessions. It records the last one to finish, so in a checkout where three agents run at once the note reflects whichever stopped most recently. The honest fix there is a worktree per session, not a smarter merge.&lt;/p&gt;

&lt;p&gt;It cannot reconstruct reasoning it was never given. If a session’s approach lived entirely in the model’s head and never touched a file, a note about files will not recover it.&lt;/p&gt;

&lt;p&gt;And it is only as good as the last session’s summary. It is a bookmark, not a substitute for writing things down.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Why it belongs next to the code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Agents are becoming interchangeable faster than anyone expected. Which one is best for a given task changes month to month, and people switch accordingly, often mid-task.&lt;/p&gt;

&lt;p&gt;The thing that should not be interchangeable is your place in the work. That state does not belong in a vendor’s session store, because you will not be in that vendor’s session tomorrow. It belongs next to the code — in a format anything can read, small enough that the next agent, whatever it turns out to be, can absorb it in one pass before touching anything.&lt;/p&gt;

&lt;p&gt;The whole feature is a JSON file in .git. Most of the engineering went into deciding what to leave out of it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Implemented in the Origin CLI (MIT, getorigin.io): handoff.ts holds the payload, the carry-forward rules and TODO extraction; context-injection.ts assembles and deduplicates the blocks injected at session start. origin handoff show prints the current note and exactly what the next agent will receive.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>devtools</category>
      <category>webdev</category>
    </item>
    <item>
      <title>ORIGIN</title>
      <dc:creator>Serhii Troian</dc:creator>
      <pubDate>Fri, 07 Aug 2026 13:05:01 +0000</pubDate>
      <link>https://dev.to/serhii_troian_getorigin/origin-f3o</link>
      <guid>https://dev.to/serhii_troian_getorigin/origin-f3o</guid>
      <description>&lt;h2&gt;
  
  
  Ground Truth for AI-Written Code
&lt;/h2&gt;

&lt;p&gt;Session capture, per-line attribution, and selection-bias-free agent benchmarks - on top of the Git host you already use.&lt;/p&gt;

&lt;p&gt;A technical overview for engineers and engineering leaders evaluating how much of their codebase is now written by AI agents - and who is accountable for it.&lt;/p&gt;

&lt;p&gt;Contents&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The problem: git blame no longer tells the truth&lt;/li&gt;
&lt;li&gt;How Origin captures an agent session&lt;/li&gt;
&lt;li&gt;Attribution: first-author-wins, with Git as the source of truth&lt;/li&gt;
&lt;li&gt;Prompt-level time travel&lt;/li&gt;
&lt;li&gt;Honest benchmarking: the agent scorecard&lt;/li&gt;
&lt;li&gt;Bake-offs: the selection-bias-free comparison&lt;/li&gt;
&lt;li&gt;For teams: governance without a second source of truth&lt;/li&gt;
&lt;li&gt;Architecture, privacy, and getting started&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. The problem: git blame no longer tells the truth
&lt;/h2&gt;

&lt;p&gt;On most teams, AI agents now write a large share of new code. But the tools that record who wrote what were built for humans. When an agent edits files in your working tree and you commit them, git blame attributes every one of those lines to you. The prompt that produced them, the model that ran, the cost, the number of turns, and whether the code survived the next sprint - none of it is recorded anywhere.&lt;/p&gt;

&lt;p&gt;That gap has real consequences:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provenance - no answer to “which agent, from which prompt, wrote this line?” during review or an incident.&lt;/li&gt;
&lt;li&gt;Cost &amp;amp; efficiency - no ground truth on what a feature cost in tokens and dollars, or which agent got there in fewer turns.&lt;/li&gt;
&lt;li&gt;Quality - no measure of whether agent-written code survives, or gets reworked and reverted days later.&lt;/li&gt;
&lt;li&gt;Comparison - “which agent is better for us?” answered by vibes, because every naive comparison is poisoned by selection bias (the hard tasks go to the agent you already trust).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Origin closes that gap. It captures the full agent session - prompt, diff, tokens, cost, tools, duration - attributes every surviving line back to an agent and a prompt using Git as the source of truth, and turns that data into honest, selection-bias-free comparisons between agents. It runs on top of GitHub or GitLab; there is nothing to migrate.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. How Origin captures an agent session
&lt;/h2&gt;

&lt;p&gt;Capture is deliberately boring and durable. A one-time origin enable registers the machine, auto-detects installed agents (Claude Code, Codex, Cursor, GitHub Copilot, Gemini, Aider, Devin, Antigravity, and more), and installs two kinds of listeners:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent hooks - Origin hooks fire on the agent’s lifecycle events (session start, each user prompt, each tool/file edit, and stop/end). They record the prompt text, the per-turn file diff, token and cost counters, tool calls, and the model.&lt;/li&gt;
&lt;li&gt;Transcript watchers - for agents that keep a durable on-disk transcript (e.g. Codex’s rollout logs, Devin’s local session DB), Origin reads that record directly instead of depending on hooks. The principle: if there is an authoritative transcript, read it; hooks are for context and policy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Capture is resilient by design. It writes locally first, retries on a durable queue when the network is down, resolves session end from heartbeat liveness rather than a fragile inactivity timer, and is aware of git worktrees so parallel sessions don’t collide. Sessions that never produced real work are swept so counts reflect reality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2weps2gdjdduuar12yxx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2weps2gdjdduuar12yxx.png" alt="Figure 1. Every AI coding session Origin captured - agent, model, cost, tokens, branch, and review status. This is the raw material everything else is built on." width="800" height="415"&gt;&lt;/a&gt;&lt;br&gt;
Figure 1. Every AI coding session Origin captured - agent, model, cost, tokens, branch, and review status. This is the raw material everything else is built on.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Attribution: first-author-wins, with Git as the source of truth
&lt;/h2&gt;

&lt;p&gt;Recording a session is easy; attributing lines correctly is the hard part, and it is where Origin is opinionated. The model is first-author-wins: a line is credited to whoever introduced it, and later edits never re-claim it. For pushed commits, Git is the ground truth - Origin reconciles its capture against the committed diff rather than trusting a possibly-lossy hook stream.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frkl0b83wjrfv0m2glz6f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frkl0b83wjrfv0m2glz6f.png" alt="Figure 2. One session, decomposed: each prompt and its diff (committed vs uncommitted), the linked commit, and a 100%-AI verdict - the ground truth per-line blame is built from. The AI Blame tab drills to the line level." width="800" height="415"&gt;&lt;/a&gt;&lt;br&gt;
Figure 2. One session, decomposed: each prompt and its diff (committed vs uncommitted), the linked commit, and a 100%-AI verdict - the ground truth per-line blame is built from. The AI Blame tab drills to the line level.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Prompt-level time travel
&lt;/h2&gt;

&lt;p&gt;Because Origin records the state before every prompt, each prompt becomes a restore point. You can undo an agent’s changes - the files revert - without rewriting or losing your commits.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Honest benchmarking: the agent scorecard
&lt;/h2&gt;

&lt;p&gt;Once sessions are captured and attributed, Origin computes a per-agent scorecard - efficiency, outcome, and survival - over your real work. The point of difference is honesty: the scorecard refuses to draw conclusions the data can’t support.&lt;/p&gt;

&lt;p&gt;The guardrails matter as much as the metrics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimum sample size - agents aren’t ranked on a handful of sessions; below a threshold, a metric is shown as “not enough data,” not a misleading average.&lt;/li&gt;
&lt;li&gt;Confidence intervals - ratio metrics (e.g. tokens-per-line) carry a CI, so a noisy small sample can’t masquerade as a clear winner.&lt;/li&gt;
&lt;li&gt;Estimated tokens excluded - sessions whose token counts were estimated rather than reported are flagged and kept out of the money math.&lt;/li&gt;
&lt;li&gt;Line-weighted authorship - the AI-vs-human percentage is weighted by lines, not session count, so one giant human commit doesn’t get outvoted by many tiny agent ones.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbsooutyxhbbqwle6wj9q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbsooutyxhbbqwle6wj9q.png" alt="Figure 3. The agent scorecard - cost, tokens-per-line, median turns, approval, and survival per agent, with sample-size and confidence guardrails." width="800" height="415"&gt;&lt;/a&gt;&lt;br&gt;
Figure 3. The agent scorecard - cost, tokens-per-line, median turns, approval, and survival per agent, with sample-size and confidence guardrails.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Bake-offs: the selection-bias-free comparison
&lt;/h2&gt;

&lt;p&gt;The scorecard measures agents on the work you happened to give them - and you give the hard tasks to the agent you trust, which skews every comparison. A bake-off removes that bias by construction: it runs the same prompt through N agents, each in its own isolated Git worktree, and lets you compare the results side by side. Every arm gets identical work.&lt;/p&gt;

&lt;p&gt;Architecture: the server schedules, your machine executes&lt;/p&gt;

&lt;p&gt;Coding agents run on your machine, with your keys - Origin’s cloud can never run them. So a bake-off is split cleanly in two: the server owns the queue and the schedule; a local runner daemon owns execution.&lt;br&gt;
Each arm branches from HEAD into bakeoff//, the agent works autonomously and commits, and Origin correlates the result back to the branch via normal session capture - nothing extra to wire up. The list nests each arm’s session inline (cost, tokens, lines, status), filters by status/repo/agent, pages ten at a time, and rolls up a head-to-head agent comparison across every bake-off you’ve run.&lt;/p&gt;

&lt;p&gt;Deliberately, Origin does not auto-declare a winner. It tints the cheapest and fewest-turns arms to help you scan, but “cheapest” and “best” are not the same thing - only a human reading the diff can decide. You pick the winner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fohw16pzr8g7af1fbaelq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fohw16pzr8g7af1fbaelq.png" alt="Figure 4. Composing a bake-off - the same prompt, two or more agents, each running autonomously in its own git worktree. Results stream back as sessions and roll up into a head-to-head comparison." width="800" height="415"&gt;&lt;/a&gt;&lt;br&gt;
Figure 4. Composing a bake-off - the same prompt, two or more agents, each running autonomously in its own git worktree. Results stream back as sessions and roll up into a head-to-head comparison.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. For teams: governance without a second source of truth
&lt;/h2&gt;

&lt;p&gt;Everything above is per-developer value that also aggregates for a team. On top of it, Origin adds an org layer: typed policies enforced across review, PR checks, and CI; AI auto-review of agent sessions; secret and PII scanning on captured diffs; budgets and cost controls with per-agent visibility; role-based access; and an organization dashboard that shows what share of the codebase is AI-authored, by whom, at what cost - line-weighted, not guessed.&lt;/p&gt;

&lt;p&gt;Because attribution is per line and travels with the repo (prompts are carried in Git notes, and a dedicated sessions branch makes context portable across clones), the governance view is derived from the same ground truth developers see - not a parallel system that drifts.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Architecture, privacy, and getting started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Local-first capture - session data is recorded on your machine first. A fully standalone mode keeps everything in the repo with no account at all.&lt;/li&gt;
&lt;li&gt;Sits on your host - GitHub and GitLab, multiple connected accounts, native Windows/macOS/Linux CLI. No repo migration.&lt;/li&gt;
&lt;li&gt;Portable provenance - prompts live in Git notes; the origin-sessions branch is a zero-tooling vehicle so a fresh clone still has the history.&lt;/li&gt;
&lt;li&gt;CLI-native - the CLI is a single Node binary distributed via signed GitHub releases; the platform API runs on a small, boring stack (Express + Prisma).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Origin turns the invisible half of your codebase - the half an agent wrote - into something you can read, attribute, price, and compare. Solo, it’s your provenance and undo button. For a team, it’s the ground truth under every AI-code decision.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>AI coding at team scale: sessions, budgets, and policies</title>
      <dc:creator>Serhii Troian</dc:creator>
      <pubDate>Thu, 16 Jul 2026 17:28:22 +0000</pubDate>
      <link>https://dev.to/serhii_troian_getorigin/ai-coding-at-team-scale-sessions-budgets-and-policies-i0d</link>
      <guid>https://dev.to/serhii_troian_getorigin/ai-coding-at-team-scale-sessions-budgets-and-policies-i0d</guid>
      <description>&lt;h2&gt;
  
  
  What it takes to see every session, control the spend, and enforce policy when several agents are writing your code.
&lt;/h2&gt;

&lt;p&gt;A pull request lands. Four hundred lines, six files, tidy commits. Which agent produced it? Which prompts? What did it cost? Did it touch anything it shouldn’t have? Has anyone actually looked at it?&lt;/p&gt;

&lt;p&gt;For most engineering organizations, the honest answer to all five is: no idea. Your team adopted Claude Code, Cursor, Codex and Gemini in about six months. Your tooling still assumes a human typed every line.&lt;/p&gt;

&lt;p&gt;Three things have to be true before any of that becomes answerable at team scale. You need a record of what the agents actually did — the sessions. You need to know what it cost, and be able to stop it before it hurts — the budgets. And you need your standards to be something that runs, not something on a wiki — the policies.&lt;/p&gt;

&lt;p&gt;That’s the shape of the rest of this piece. The examples below are how we built it in Origin Team, but the three problems are the same whatever you use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhaxz4v4824tbysrpa50c.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhaxz4v4824tbysrpa50c.webp" alt="One screen: how many sessions ran, what they cost, and how much of the team is actually using AI" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Sessions: what your agents actually did
&lt;/h2&gt;

&lt;p&gt;Everything else is built on one thing: the session. If you can’t reconstruct what an agent did, you can’t cost it, review it, or govern it. So that’s where it starts.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The capture&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Your engineers install a CLI, log in to your organization, and run one command inside their repo. From then on, capture is automatic. No per-tool setup, no changed workflow, and it works the same across every agent they use.&lt;/p&gt;

&lt;p&gt;npm i -g &lt;a href="https://getorigin.io/cli/origin-cli-latest.tgz" rel="noopener noreferrer"&gt;https://getorigin.io/cli/origin-cli-latest.tgz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;origin enable&lt;/p&gt;

&lt;p&gt;The Sessions view then lists every session anyone on the team runs, with the name, model, repository, branch, and the engineer who ran it. Open one and you get the full timeline: each prompt, the agent’s output, and the exact changes that prompt produced, down to the files it touched and the lines it wrote.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx9ruz0vayi5zcc5ymx45.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx9ruz0vayi5zcc5ymx45.webp" alt="Every session your team runs, across every agent, in one list" width="799" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fentg50uos1l4iqonjhay.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fentg50uos1l4iqonjhay.webp" alt="nside a session: each prompt, and exactly what it changed" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That record is the raw material for everything that follows.&lt;/p&gt;

&lt;h2&gt;
  
  
  The dashboard: your organization at a glance
&lt;/h2&gt;

&lt;p&gt;The dashboard answers what a lead actually asks on a Monday: sessions per agent, token usage this month broken out by agent, cost by model, and AI adoption, meaning how many of your engineers are genuinely coding with AI rather than just licensed for it.&lt;/p&gt;

&lt;p&gt;Four tabs go deeper:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Activity — sessions per day, top agents, top repositories, and lines written this month. Team adoption breaks it down per engineer: how many sessions they ran, and how much code they actually produced.&lt;/li&gt;
&lt;li&gt;Cost &amp;amp; efficiency — which agent is genuinely more productive: cost per session, cost per commit, cost per line.&lt;/li&gt;
&lt;li&gt;Quality — reviewed PRs, approved PRs, and policy compliance.&lt;/li&gt;
&lt;li&gt;Prompts — every prompt your engineers ran, searchable. Find a specific session or prompt for debugging, review, or reference.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repositories: every change, attributed&lt;/p&gt;

&lt;p&gt;Connect your GitHub or GitLab repos and every change made to them is tracked. Click into a repository and you see each commit by user, the familiar Git line-by-line view, and, on captured work, the prompt behind each change plus the agent and model that made it. You can also see which sessions ran inside that repo, and by whom.&lt;/p&gt;

&lt;p&gt;It answers “what changed, who changed it, which agent, and what were they asking for” in one place, per repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1luiw4n0njkga64dcv11.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1luiw4n0njkga64dcv11.webp" alt="A commit, the agent that wrote it, and the prompts behind it" width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Insights: the numbers you’ve been guessing at
&lt;/h2&gt;

&lt;p&gt;Insights turns the session record into the view you actually wanted: AI authorship as a share of the lines written, lines changed over time, cost over time, cost by model, sessions and cost per repository, and model adoption, meaning which models your team leans on most.&lt;/p&gt;

&lt;p&gt;It’s the difference between “we use AI a lot” and a number you can take into a budget meeting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjgp5vy9bz33lf7mm5o6e.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjgp5vy9bz33lf7mm5o6e.webp" alt="AI authorship, cost by model, and model adoption over time" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Budgets: what it costs, and stopping it before it hurts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you have the sessions, cost stops being a monthly surprise. Spend is tracked across the organization so you can project it, monitor it, and cap it: how much went to a specific engineer, agent, or model, alongside a monthly projection based on recent usage. Token utilization is tracked the same way, not just dollars.&lt;/p&gt;

&lt;p&gt;Then you set the guardrails. Limits come at two levels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A soft limit warns the engineer but lets them keep coding.&lt;/li&gt;
&lt;li&gt;A hard limit stops the agent from writing code and tells the user they have exceeded their budget.
Set them daily, weekly, or monthly, and scope them per organization, per engineer, per agent, per model, or even per repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the difference between finding out about a $600 Thursday on next month’s invoice and not having a $600 Thursday.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Policies: your rules, actually enforced&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most teams already have standards for AI use. They live in a Notion page nobody opens. Policies make them something that runs inside the coding session: rules that allow, restrict, or prohibit specific actions, for the whole org or for specific users.&lt;/p&gt;

&lt;p&gt;Agents: what your team is allowed to run&lt;/p&gt;

&lt;p&gt;First you decide the surface: which agents exist, which are allowed, and what rules ride along with each. Per agent, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set a system prompt that is shown to every engineer who launches it.&lt;/li&gt;
&lt;li&gt;Set session limits, meaning how many tokens or how much cost a single session may consume.&lt;/li&gt;
&lt;li&gt;Attach policies, org-wide or specific to that agent.&lt;/li&gt;
&lt;li&gt;Review versions. Every configuration change is versioned, and you can roll back.&lt;/li&gt;
&lt;li&gt;Control access, so you can see exactly who can use each agent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhji53ddnq2g713xiarq0.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhji53ddnq2g713xiarq0.webp" alt="Which agents your team may run, and the rules attached to each" width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The rules&lt;/p&gt;

&lt;p&gt;The built-in rule types cover most of what teams need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File restriction, to keep agents out of .env files, secrets, and prod configs.&lt;/li&gt;
&lt;li&gt;Model allow-list, to ban specific models from being used for coding.&lt;/li&gt;
&lt;li&gt;Content filter, to block specific words, phrases, or patterns.&lt;/li&gt;
&lt;li&gt;Cost limits, required review, commit-message rules, and session limits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the presets don’t cover it, you describe the rule in plain English and the policy is generated for you, then injected into your agents: all of them, or only the ones you choose. Those rules reach each engineer through their CLI, and when someone crosses a line it shows up under Violations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhp62aii34xmyhafzjjnk.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhp62aii34xmyhafzjjnk.webp" alt="Rules that run in the session, not on a wiki page" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pull request checks: the gate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A rule with no teeth is a suggestion. This is where it bites. Origin builds its review directly into GitHub pull requests and GitLab merge requests. When an engineer finishes a session and pushes, you get a PR check, and the pull request stays frozen until someone reviews what produced it: the sessions, the cost, the prompts, and the changes. Approve, and only then is it allowed to merge.&lt;/p&gt;

&lt;p&gt;No new process for your team to adopt. The gate sits on the workflow you already have.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F53245gaf3b739ocarqbz.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F53245gaf3b739ocarqbz.webp" alt="The pull request stays blocked until someone reviews what the agent actually did" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The rest of it&lt;/p&gt;

&lt;p&gt;Snapshots let an engineer roll back to a specific prompt. Ten prompts deep and you want to return to prompt five? Digging through git history for that is miserable. Instead, pick the snapshot for that prompt, press restore, and the source is back to that point.&lt;/p&gt;

&lt;p&gt;Security runs a built-in analyzer over captured work and flags what slipped in: credentials, API keys, emails, and other secrets that ended up in the source. Because every change carries the prompt behind it, tracing how something got there is a click, not an investigation.&lt;/p&gt;

&lt;p&gt;Infrastructure shows the users and machines running Origin, a live picture of who and what is doing AI-tracked work.&lt;/p&gt;

&lt;p&gt;IAM is where you define access levels to agents and repositories, and invite members with exactly the permissions you intend.&lt;/p&gt;

&lt;p&gt;Settings holds general configuration, your coding plan (set per agent), API keys, and integrations: GitHub, GitLab, Slack, email reports, and an AI provider (recommended, so PR summaries and review checks work). Alongside it: notifications, a full audit log of everything reported, and a compliance tab for reporting.&lt;/p&gt;

&lt;p&gt;One design decision underneath all of it&lt;/p&gt;

&lt;p&gt;None of this works as a dashboard watching from the outside. The prompt, the model, the diff, and the cost are written into the Git repository itself, next to the commits they produced.&lt;/p&gt;

&lt;p&gt;That has consequences worth caring about. The history travels with a clone: new laptop, new teammate, new agent, it comes along. It is vendor-neutral, so work recorded by Claude Code is readable by Codex. And there is no lock-in on your own project’s history.&lt;/p&gt;

&lt;p&gt;Getting started&lt;/p&gt;

&lt;p&gt;Setting up the organization takes a few minutes: create the account, pick the agents your team uses, set your billing policy, connect your repositories, and invite your teammates. Each engineer then installs the CLI and runs origin enable once. Their sessions roll up into your dashboard from that point on.&lt;/p&gt;

&lt;p&gt;Origin Team is $29 per user per month, with a 14-day free trial. Solo developers use it free, forever.&lt;/p&gt;

&lt;p&gt;Watch the full platform tour:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/XMwH7j9Ij5k" rel="noopener noreferrer"&gt;https://youtu.be/XMwH7j9Ij5k&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
