{% extends "base.html" %} {% from "_note.html" import box with context %} {% import "_tokens.html" as tkm %} {% import "_sched.html" as schm with context %} {% import "_report.html" as rpm %} {% import "_console.html" as cv %} {% import "_vscode.html" as vsm %} {% import "_answer.html" as ans with context %} {% import "_plan.html" as plm with context %} {% import "_autoopen.html" as aom with context %} {% import "_outline.html" as olm %} {% block title %}{{ p.short }} · {{ e.name }}{% endblock %} {% block crumbs %}/ {{ e.name }} / {{ p.short }}{% endblock %} {% block main %} {% if p.outline %}{{ olm.style() }}{% endif %}

{{ p.wpid }} {% if p.running %}RUNNING{% endif %} {% if p.meta.state == "NEEDS_INPUT" and p.questions and not p.running %}NEEDS_INPUT {% else %}{{ p.meta.state or "?" }}{% endif %} {% if p.taken_by %}IN STUDIO{% endif %} {% if p.agents %}{{ p.agents.text }}{% endif %}

{#- Now (docs/collaboration.md §8.4): who is on it, whose move it is, how much the runner may do. -#}
Now: {{ {"runner": "the runner is on it", "you": "you have it", "you + runner": "you and the runner are both on it", "nobody": "nobody is on it"}[p.driver] }} · next move: {{ {"you": "yours", "agent": "the runner's", "scheduled": "scheduled", "external": "a job's", "nobody": "none"}[p.ball.who] }} ({{ p.ball.text }}) {% if p.lifecycle != "open" %}· {{ p.lifecycle|upper }}{% endif %} {% if p.wpid == e.root %}
{% if p.plan %}{{ plm.chips(p.plan, "") }}{{ plm.menu(e.name, p.plan, "/p/" ~ (e.name|urlencode) ~ "/" ~ p.wpid, p.milestones) }}{% endif %} {% if p.actuals %}{% if p.plan and p.plan.estimate %}estimate {{ p.plan.estimate }} · {% endif %}{{ p.actuals.text }}{% endif %} {% if not p.running and not p.taken_by %}
{% if p.lifecycle == "open" %} {% else %}{% endif %}
{% endif %} {% if not e.closed %}Close…{% endif %} {% endif %}
{% set sbase = "/p/" ~ (e.name|urlencode) ~ "/" ~ p.wpid ~ "/studio" %} {% if autoopen %}{{ aom.form(e, p.wpid, autoopen) }}{% endif %} {% if p.taken_by %}
In studio ({{ p.taken_by }}) since {{ p.taken|when }}: the runner leaves it alone until it is released. {% if p.taken_by == user %}Return to the studio{% else %}See the studio{% endif %}
{% elif p.taking %}
{{ p.taking }} is taking it for the studio: taking over after this step. Studio
{% elif p.studio and p.meta.state %}
{% endif %} {% if p.running %}
Running step {{ p.running.step }}, attempt {{ p.running.attempt }}, since {{ p.running.since|when }}. Live view · processes{% if p.steps and p.steps[0].outcome == "running" %} · full transcript{% endif %}.
{% endif %} {% for d in docs_built|default([]) %}{% set b = d.rec %}{% set dbase = "/p/" ~ (e.name|urlencode) ~ "/docs/" ~ (d.entry|urlencode) ~ "/" ~ (d.name|urlencode) %}

Docs {{ d.entry }}/{{ d.name }} {{ "rebuilt after a step" if b.by == "step" else "built" }} from this run, {{ b.end|epoch }}: {{ b.result }}{% if b.warnings %}, {{ b.warnings }} warning{{ "s" if b.warnings != 1 }}{% endif %}{% if b.why %} ({{ b.why }}){% endif %} · {% if d.newest and b.result != "failed" %}Open · {% elif not d.newest %}a newer build has replaced it · {% endif %}log

{% endfor %} {% set st = p.meta.state %} {{ rpm.panel(e, p) }} {% if p.wpid == e.root and not p.running and st in ("COMPLETED", "NEEDS_INPUT", "PAUSED", "FAILED") %}
{% if p.meta.reason == "setup" %}Hand to runner…: write what it should do (inputs, settings and a shell are there too), then hand it off. Or work on it yourself: open it in VS Code below. {% else %}Hand off…: {{ "the runner finished; " if st == "COMPLETED" }}give it a new instruction, change files in a shell, and hand it off.{% endif %}
{% endif %} {% if p.questions and not p.running and not p.taken_by %} {{ ans.form(e, p.wpid, p.questions) }} {% elif st in ("PAUSED", "FAILED", "NEEDS_INPUT") and not p.running and not p.taken_by %}

Hand off

{% if p.meta.reason %}

{{ p.meta.reason }}

{% endif %} {% if rl and rl.over %}

{{ rl.n }} finished {{ "project waits" if rl.n == 1 else "projects wait" }} for your review{% if rl.oldest %} (oldest {{ rl.oldest }}){% endif %}, at or over your limit of {{ rl.limit }}. Handing off more makes more to review: review first?

{% endif %}
{% elif st in ("RUNNABLE", "SLEEPING") and not p.taking %}
{% if p.pausing %}PAUSING pauses when the running step ends (asked by {{ p.pausing.by or "someone" }}) {% else %}{% endif %}
{% endif %} {{ schm.packet_panel(e, p.wpid, sch, classes) }} {% if ide.desktop or ide_web %}
{% if ide.desktop %}{% endif %} {% if ide_web %}{% if ide_sizes|length > 1 %}{% endif %}{% endif %} {% if p.running %}Opening it takes it from the runner once its running step ends; it is yours until you hand it back.{% elif st in ("RUNNABLE", "SLEEPING") %}Opening it takes it from the runner: it is yours until you hand it back.{% elif packet_layout(e.path) %}The packet folder, {{ packet_folder(e.path) }}.{% else %}Its worktrees, state/ and the packet folder.{% endif %}
{% endif %} {% if p.hooks and p.hooks != "installed" %}
Claude Code hooks in the folder: {{ {"installed": "installed", "missing": "not installed", "modified": "changed by hand", "unreadable": "settings file unreadable"}[p.hooks] }}
{{ vsm.hooks_switch(hooks_on, "/p/" ~ (e.name|urlencode) ~ "/" ~ p.wpid, csrf) }} {% endif %} {% if desk %}
{% set ends %}{% if desk.terminals %}{{ desk.terminals }} terminal{{ "s" if desk.terminals != 1 }}{% endif %}{% if desk.terminals and desk.agents %}, {% endif %}{% for a in desk.agents %}{{ a.argv.split()[0] }} (pid {{ a.pid }}{% if a.since %}, running {{ a.since|age }}{% endif %}){{ ", " if not loop.last }}{% endfor %}{% endset %} VS Code {{ desk.version }}{% if desk.started %} running {{ desk.started|age }}{% endif %}{% if desk.terminals or desk.agents %} · {{ ends }}{% endif %}. {% if desk.newer %}VS Code {{ desk.newer }} is ready: it takes effect the next time this VS Code starts.{% if desk.terminals or desk.agents %} Restarting now ends {{ ends }}.{% endif %}{% endif %}
{% endif %} {% for s in strand or [] %}
Stranded VS Code server {{ s.pid }} ({{ s.commit[:7] }}) still runs {% if s.agents %}{{ s.agents|length }} agent session{{ "s" if s.agents|length > 1 }} no tab shows: {% for a in s.agents %}{{ a.pid }} {{ a.argv }}{{ ", " if not loop.last }}{% endfor %}{% else %}with no agent sessions in it{% endif %}.
{% endfor %} {% if vsc and (vsc[0] or vsc[1]) %}

VS Code sessions

{% if vsc[0] %}{{ vsm.table(vsc[0]) }}{% endif %} {% if vsc[1] %}

Shared editor (packet not determined): another packet opened the same folder.

{{ vsm.table(vsc[1]) }}{% endif %} {{ vsm.scribe_switch(scribe_on, "/p/" ~ (e.name|urlencode) ~ "/" ~ p.wpid ~ "#vscode-sessions", csrf) }} {% endif %} {% if p.draft and not p.running %}
Draft checkpoint the scribe wrote the status from the end of a session (step {{ p.draft.step }}). Accept it as yours (its next action becomes what the runner starts from), or edit it below.
{% endif %}
Checkpoint {% if p.running %}a step is running: this becomes a note it sees, and the status stays as it is{% else %}where it stands after work by hand; the board's card shows it{% endif %}
{% if vsc and vsc[0] %}{% endif %}
{{ box(e, p.wpid, st, p.running, p.notes) }} {% if p.outline %}{{ olm.panel(e, p.wpid, p.outline, fold=True, finished=p.lifecycle != "open" or p.meta.state == "COMPLETED") }}{% endif %}

{% if not p.running %}Live view: the last step's activity and the steps done. {% endif %}{% if not p.outline %}Plan: the outline as a tree, and how it changed step by step.{% endif %}

Status

{% for k, v in p.fields %}
{{ k }}
{% if k == "parent" and v %}{{ v }}{% elif v is none %}-{% elif k == "children" %}{{ v|length }}{% else %}{{ v }}{% endif %}
{% endfor %} {% if p.next %}
next
{{ p.next }}
{% endif %}
directory
{{ p.path }}
{% if p.summary and not p.report %}

Last summary

{% if p.summary_html is not none %}
{{ p.summary_html|safe }}
{% else %}
{{ p.summary }}
{% endif %}{% endif %}

Next instruction (memento.md)

{{ p.memento }}

State files

{% if not p.files %}

state/ is empty.

{% endif %} {% for f in p.files %}
state/{{ f.rel }} {{ f.size }} bytes {% if f.text is not none %}
{{ f.text }}
{% else %}

Binary or too large to show.

{% endif %}
{% endfor %} {% if convs %}

Console

{{ cv.table(convs, False) }} {% endif %} {% if p.children %}

Children

{% for c in p.children %} {% endfor %}
ChildStateStepLast summary
{{ c.name or c.short }} {{ c.state }}{{ c.step }}{{ c.summary }}
{% endif %}
{% if tk %}

Tokens

{{ tkm.summary(tk.figures, tk.steps) }} {{ tkm.chart(tk.chart, "Context read per step (failed attempts marked red)") }} {{ tkm.chart(tk.chart_out, "Output per step") }}
{% if tk.by_item %}

By plan item

{{ tkm.table(tk.by_item, "Item") }}{% endif %} {% if tk.tools %}

Where the context went

{{ tkm.tools(tk.tools) }}{% endif %} {% endif %} {% if p.timeline %}

Timeline

Everything that happened, by whoever did it: the runner's steps, your checkpoints and hand-offs, sessions in VS Code. The runner's detail is under Steps.

{% if p.timeline|length > 25 %}
{{ p.timeline|length - 25 }} older
{% endif %} {% endif %}

Steps

{% if p.steps %}
{% if p.steps|selectattr("item")|list %}{% endif %} {% set items = p.steps|selectattr("item")|list %} {% for s in p.steps %} {% if items %}{% endif %} {% endfor %}
StepOutcomeStartedTimeCostContextOutputItemSummary
{{ s.n }}{% if s.outcome == "failed" %} attempt {{ s.attempt }}{% endif %} {{ s.outcome }}{% if s.worker and s.worker != "agent" %} {{ s.worker }}{% endif %} {{ s.start|when }} {{ s.duration_s|secs }} {{ s.cost_usd|money }}{% if s.cost_basis and s.cost_basis != "harness" %} {{ s.cost_basis }}{% endif %} {{ s.context_tokens|tok if s.context_tokens is not none }} {{ s.output_tokens|tok if s.output_tokens is not none }}{{ s.item or "" }}{% if s.why %}{{ s.why }}{% else %}{{ s.summary }}{% endif %}
{% else %}

No steps yet.

{% endif %} {% if dfm %} {% import "_dfm.html" as dfmm with context %}{{ dfmm.style() }}

DFM runs ({{ dfm|length }})

{{ dfmm.table(dfm[:5], packet=False) }} {% if dfm|length > 5 %}

All {{ dfm|length }} runs

{% endif %} {% endif %}
Journal (last {{ p.journal|length }} records)
{% for r in p.journal|reverse %} {% endfor %}
TimeTypeStepDetail
{{ r.t }}{{ r.type }}{{ r.step if r.step is defined }} {{ r|tojson }}
{% if resolve_ok %}{% endif %} {% endblock %}