Using Alara Code
Activity and costs
Every run and model change: who did it, on which model, how it ended, and what the work cost.
12 min read8 sections
Every time someone starts a step, Alara Code records a run: which step it was, who started it, which agent did the work, which model it ran on, how it ended and how long it took. Every time someone changes a model setting, it records that too: who changed it, when, and from which model to which. You read both in the project's Activity tab; the Activity page lists runs across all your projects. This page also explains how Alara Code accounts for what the agent's work cost, and where that shows up.
Two places to see activity
| Where | How to open it | What it lists |
|---|---|---|
| Activity tab | Open a project, then choose Activity in the project's sections | The project's last 20 runs and its model changes, newest first |
| Activity page | Activity in the main sidebar (the /runs page) | Every run across every project you can see, newest first, 50 at a time as you scroll |
Both read the same run records, and both draw a run the same way.
The project's Activity tab
The tab is headed Activity. Above the list, a switch picks what to show: All (runs and model changes on one timeline), Runs or Model changes.
A run row shows:
- the step, written as a command, such as
/scopeor/srs, and a badge with its status (see Run statuses below); - underneath, who started it and which agent ran it, for example "by Dana Lee · on SDLC writer", and the model the run's calls used, for example "on claude-sonnet-5-5" (hover it for the provider). A run whose calls recorded no model says "model not recorded";
- a failed run's error message, in red;
- on the right, when it started and how long it took.
A model change row shows:
- which setting changed and how, for example "Project model: glm-5.2 → claude-sonnet-5-5" or "Prototype model: project model → claude-opus-5-5";
- who changed it, and the step that first ran on it ("first used on /srs"), or "applies from the next step" when nothing has run since. A prototype-model change applies to the next /proto only;
- on the right, when it was changed.
Saving a model that is already set records nothing. The project's Settings › Engine section shows the latest few changes too; the organization's own default models have their history in Settings › AI providers.
The tab refreshes itself: every 5 seconds while a step is running on the project, and every 30 seconds otherwise. The duration of a run that is still going is measured up to the last refresh, so it moves forward in steps rather than ticking every second.
The Activity page
The page is headed Activity, "Every step run and model change across your projects: who did it, on which model, and how it ended." A Runs / Model changes switch sits under the heading. Model changes lists every change to a project's models that you can see, newest first: the project, who changed it, and from which model to which; select one to open that project's Activity tab. Runs is the default, and under it are six counters, the total and one for each of the five run statuses:
| Counter | What it counts |
|---|---|
| Total runs | Every run you can see, not just the ones loaded so far |
| Running | Runs with the running status. While any are running, the counter shows a pulsing Live hint. |
| Pending review | Runs with the pending_review status, waiting for someone to approve or ask for changes |
| Completed | Runs with the complete status |
| Errors | Runs that ended error |
| Aborted | Runs that ended aborted: stopped by someone pressing stop, or by the run time limit |
Under the counters are five filter buttons, Running, Pending review, Completed, Errors and Aborted, each with its count. Every counter and button is exactly one run status, so a stopped run is counted under Aborted and never under Errors. Press one to list only those runs; press it again to see every run. The list loads 50 runs first, and more load by themselves as you scroll down, until a line says you have reached the end.
Each row is drawn like a run in the project's tab, with the project's name first. Click a row (or focus it and press Enter or Space) to open that project's Activity tab.
When none of your projects has a run yet, the page shows No runs yet with "Run a command from any project to see history here."
Run statuses
A run has one of five statuses. The badge shows the status name as recorded.
| Status | Meaning |
|---|---|
running | The step is in progress. The badge carries a pulsing dot. |
pending_review | The step finished and produced a new draft that is waiting for a human to approve it or request changes. |
complete | The step finished and, for a step with an approval gate, its draft was approved. Steps without a gate go straight here when they finish. |
error | The step failed. The error message is shown under the badge in the project's tab. |
aborted | The step was stopped, either by someone pressing stop or because it ran past the time limit for a single run. |
- start to running, Step started
- running to pending review, Draft produced (gated step)
- running to complete, Finished (step without a gate)
- running to error, Failed
- running to aborted, Stopped or over time limit
- pending review to complete, Draft approved
- complete to pending review, Same step regenerated
A few details that explain what you see:
- Approval changes the run's status. Every step that writes a document (the chain documents and Tasks, Compliance, Traceability, the Threat Model and the Prototype) has an approval gate. When one of those finishes with a new draft, its run shows
pending_review; approving the draft turns the same runcomplete. See Review, approve, request changes. - A completed run can go back to review. An approval belongs to one exact version of a document. When a gated step is run again and produces a new version, that step's approval no longer holds, and its earlier
completeruns are switched back topending_reviewso the history matches what still needs approving. Later steps keep their approvals; they are only marked as built on an older input ("re-run, upstream changed" in the composer). See How the pipeline works. - A re-run that changes nothing reads Nothing changed. If a gated step runs again and produces exactly the document that was already approved, there is nothing new to review. The run is recorded as
error, but the project's Run History tab shows a grey Nothing changed badge with the line "Nothing new to review. The approved version stands." The Run history page still counts it under Errors. - A discarded revision reads Discarded. When you discard a revision, its run is recorded as
aborted, and the project's Run History tab shows a grey Discarded badge with the line "The revision was discarded. The approved version stands." - Request changes is a run too. When you request changes on a draft, the revision is recorded as a run of that step and lands in
pending_reviewagain. - Chat messages are not runs. Talking to the agent in the project chat does not add rows to Run History.
Who started a run
Anyone who can open a project and holds the run permission can start its steps, so several people may drive one project. The subtitle under each command in the project's tab says by whom: the name of the person who started the run, or their email address when no name is set.
The on part names the Alara agent that did the work. The name is captured when the run starts, so if the project is later bound to a different agent, older rows still show the agent that actually ran them. See Set up the project agent.
Anyone who can see the project can stop a running step, not only the person who started it, provided they hold the stop permission. See Members and permissions.
Durations
Duration is the time from the run's start to its end, shown in whole minutes and seconds (12m 5s) or seconds alone under a minute (42s). A run that has not ended yet is measured up to now (on the Run history page) or up to the last refresh (in the project's tab).
The duration covers the whole run: every call to the agent, and every correction round when an administrator has allowed them. Time spent waiting for your approval afterwards is not part of it.
Errors in the history
A run that ends error stores a message, and the project's Run History tab shows it under the status badge. Common messages:
| Message | What happened | What to do |
|---|---|---|
Starts with AGENT_REPLY_TIMEOUT | The agent did not answer in time. | Check the agent in Alara (its skills and model limits), then run the step again. |
Starts with AGENT_CALL_FAILED | The agent's call failed on Alara's side. | Check the agent's model in Alara, then run the step again. |
Starts with AGENT_INVALID_REPLY | The agent's reply could not be used. | Run the step again; if it keeps failing, check the agent's skill files. |
| "Command /step finished but did not produce a new version …" | A re-run produced the same document that was already approved. | Nothing to review. Change the inputs, or request changes on the draft, if you want a different version. |
| "Command /step finished but did not produce the expected artifact …" | The step ended without writing its document. | Run the step again and read the run output. |
| "Command /tasks did not produce a ticket manifest …" | The Tasks step stopped at a precondition. | Follow the message: usually re-run SDS, then Tasks. |
bridge-restart-sweep | The service restarted while the run was in progress, so the run could not finish. | Run the step again. |
stale-lock: cleared on next acquire | A run held the project for more than 30 minutes without finishing, and the next step started on the project cleared it. | Run the step again. |
Other messages are the underlying technical error. The full catalogue of error codes, with causes and fixes, is in Troubleshooting. While a step is running, the live run panel in SDLC Pipeline gives more detail than the history does; see Run the pipeline.
A run that was stopped (aborted) shows no message in the tab, whether someone pressed stop or the run hit the time limit.
Who can see run history
Run records follow the project's visibility: you only see runs of projects you can see, within your current organization. Organization admins see every project in the organization; everyone else sees the projects they created and the projects shared with a team they belong to. See Members and permissions.
| What | Permission needed |
|---|---|
| The project's Run History tab | Read on the Projects module |
| The Run history page | Read on the Run module |
Deleting a project removes its run history along with its documents, artifacts and board.
Costs
Alara Code once kept a cost ledger per project, and its older entries are still shown. Each entry records the tokens a piece of AI work used and what it cost in US dollars. New spend is no longer written to it: the tokens and cost of steps on the Native engine are recorded by the orchestrator and shown on the Usage page, by project, person, model and step. A project's Run History does not carry cost.
What an entry records
One entry is written per model used in a unit of work. Each carries:
- the project, the organization, the person who started the work, and the step (for pipeline work) or other source;
- a link back to the run it belongs to;
- the model name;
- four token counts: input, output, cache read and cache write;
- the cost in US dollars, to six decimal places.
How cost is counted
Each entry stores the dollar cost it was written with. Alara Code keeps no price table of its own: whatever records an entry supplies its cost, and the ledger only adds entries up. Runs today write no entries to it, on either engine (see the note below), so these figures reflect older, recorded work only.
The breakdown
For a project, the ledger is summed three ways:
| View | What it contains |
|---|---|
| Total | All token counts and the dollar total for the project |
| By step | One row per pipeline step, in pipeline order: tokens, cost, how many distinct runs contributed, and when the last one was recorded. Steps with no cost entries do not appear. |
| By model | One row per model: input tokens, output tokens and cost, most expensive first |
Where costs appear
On the Projects page, a project card shows a cost strip when the project has recorded spend above zero: the input and output token counts (for example "120K in · 34K out") and the dollar total (for example "$1.42"). Projects with no recorded spend show no strip. Because new runs no longer add to this ledger, the strip is a historical figure, not live spend: for what a project costs now, use the Usage page.
The per-step and per-model breakdown is available from the API (below). There is no Cost tab in a project's sections.
Under the hood
| Endpoint | Returns | Permission |
|---|---|---|
GET /api/projects/:id/run-history | { runs: [...] }, the project's last 20 runs: id, command, status, startedAt, endedAt, errorMessage, agentName, startedByName | Projects, read |
GET /api/runs | Runs across the projects you can see, each with projectName, newest first. Without limit it is the newest 100 as a plain array. With limit (up to 100) it returns { runs, nextCursor, counts }; pass nextCursor back as cursor for the next page, and status (running, review, complete, error or aborted) to filter. counts come with the first page. Optional teamId narrows it to one team's projects. | Run, read |
GET /api/runs/:runId/output | A snapshot of one run: its status, the buffered output while it is still held, and its artifacts. For clients that cannot follow the live stream. | Run, read |
GET /api/projects/:id/cost | { total, byCommand, byModel } as described in The breakdown above | Projects, read |
Runs live in the run_log table and cost entries in cost_entry; every read is scoped to your organization and to the projects you can see. See Data model, API reference and Run lifecycle and streaming.