Skip to content

feat(work): show the agent's own account in the Recorded outcome card - #335

Open
FZ2000 wants to merge 2 commits into
feat/agent-reported-progressfrom
feat/recorded-outcome-agent-report
Open

FZ2000 wants to merge 2 commits into
feat/agent-reported-progressfrom
feat/recorded-outcome-agent-report

Conversation

@FZ2000

@FZ2000 FZ2000 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #324 (capture). Merge #324 first; GitHub will then retarget this PR to main.

What

The task page's Recorded outcome card used to have one line of prose: a templated sentence such as "This Task is still in progress. — agent reported", which just repeats the status badge. The card now shows the agent's own account, above the counted metrics:

Row Source
Goal The first goal recorded on the Task. Until agents write one, the first step's title, labelled Started with.
Progress The newest progress note from the root session(s). Before notes existed, the first line of the newest closed step's summary, labelled Latest step (full text on hover), or its blocker, labelled Blocked on.
Next The next_step recorded with that account.

A caption labels the whole block Agent reported. It says when the account was written and which step it came from, and notes when work continued after it was written (more than 30 minutes of later activity). The counted metrics (sessions, cost, claims supported, check runs) always render below it. The account never feeds the decision.

The fallback means existing tasks get a real account today; they don't wait for weeks of progress notes. For example, the live "jaq security review" task now reads:

STARTED WITH Whole-repo security review of jaq: PII leakage, agent runtime security, responsibility boundary
LATEST STEP Wrote PRISTINE_REPO_PLAN.md in worktree … (branch chore/pristine-repo-plan, commit 77662084, not pushed).
Agent reported · written 12m ago · from the closing note of "Propose a plan to bring jaq to a pristine state: remove dep…"

How the account is chosen (receipt._agent_report)

  • The first goal wins, so a late subagent errand can't become the Task's purpose.
  • Progress comes from the root session(s) only, because a subagent's last note describes its own errand, not the Task. Subagent steps are used only when the Task has no root steps.
  • A later event that omits progress keeps the earlier note.
  • Where it lives: dimensions.outcome.agent_report (additive; older app builds ignore it). The receipt snapshot projector revision goes 1 → 2, so saved receipts rebuild once.

Not in this PR

  • Computed Issues (failed checks, open findings and recording gaps as named items) is the next step.
  • The one-line stopping clause in the task list is also later.

Tests

  • tests/test_receipt_agent_report.py (9 tests) covers first-wins goal, excluding subagent notes, the subagent-only fallback, the summary lead, the blocker, the stale flag both sides of the 30-minute threshold, and end to end through /v1/receipt.
  • ReceiptOverviewTests adds 5 Swift tests: labels, stand-in lead plus full text, blocker, empty report renders nothing, when to drop the decision sentence, and older receipts still decode.
  • Full Python suite: 4,897 passed. The 1 failure is test_display_alignment::test_real_titles_are_worth_showing_in_full, which reads the local store and fails the same way on main. Full Swift suite: 662 tests, 0 failures, 7 skipped (the visual suites, which run via Scripts/visual-snapshots).
  • Visual regression: Fixtures/dashboard.json gives both receipts an agent_report. The verified receipt has a written goal and progress note; the blocked receipt uses the fallback path (Started with, Blocked on, Next, and "work continued after this was written"). The 12 WorkVisualRegressionTests receipt references are re-recorded on macos-26-xcode-26.6-arm64-2x (light, dark, minimum and accessibility sizes, stale and attention states). The other six visual suites verify unchanged. This caught a real bug, now fixed: the blocked card showed the agent's blocker twice, once as the decision sentence and once under "Blocked on". The decision sentence is now dropped only when the account already says the same thing, or when it only restates the status badge ("still in progress").
  • I also rendered the card from a real receipt (built from a copy of the live store) with --snapshot-work-fixture.

🤖 Generated with Claude Code

FZ2000 and others added 2 commits September 24, 2026 17:04
The card's only prose was a templated line ("This Task is still in
progress.") that restated the status badge. It now shows the agent's own
account above the counted metrics:

- Goal: the first goal recorded, or the first step's title as "Started with".
- Progress: the newest progress note from the root session(s); before notes
  existed, the lead line of the newest closed step's summary (or blocker) as
  "Latest step", full text on hover.
- Next: the next_step recorded with that account.

A caption labels it agent-reported, says when it was written and which step
it came from, and notes when work continued afterwards. The counted metrics
always render below it, and the account never feeds the decision.

- receipt: dimensions.outcome.agent_report (first-wins goal, root-only
  newest progress, subagent notes excluded unless nothing else exists)
- receipt snapshot projector revision 1 -> 2 so saved receipts rebuild
- Swift: ReceiptAgentReport model + ReceiptAgentReportPresentation

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The dashboard fixture's two receipts now carry an agent_report: the verified
receipt a written goal and progress note, the blocked receipt the stand-in
path (step title as "Started with", blocker as "Blocked on", next step, and
"work continued after this was written"). The 12 Work receipt references
are re-recorded on macos-26-xcode-26.6-arm64-2x; no other suite changed.

The first render showed the blocked card repeating the agent's blocker
twice, once as the decision sentence and once under "Blocked on". The card
now drops the decision sentence when the account already says the same
thing (and for "still in progress", which restates the badge); every other
decision sentence stays.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant