Skip to content

feat: let agents update their session's retrospectives - #211

Merged
kalaspuff merged 4 commits into
mainfrom
fctl/136-it-would-be-great-if-sessions-generally
Oct 22, 2026
Merged

kalaspuff merged 4 commits into
mainfrom
fctl/136-it-would-be-great-if-sessions-generally

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Agents recorded a retrospective at the end of each turn that finished a piece of work, and ~/AGENTS.md gave each follow-up that changed the work (review comments, a new request) one of its own. A session that went through a review round, or waited on a person, ended with several retrospectives that each told part of the story, and a blocked one stayed blocked in the project's counts after the work was done.

Now a session keeps one retrospective for each piece of work, and its agent updates it as later turns carry on with that work. A session that turns to different work still records another.

What changed

  • fctl retro update rtr_… [--outcome …] [--worked-on …] [--approach …] [--challenges …] [--insights …] (agents, in a sandbox) changes a retrospective of the agent's own session in place. The outcome and parts it gives replace what the retrospective said; an empty part is left out, though what the work was can't be emptied; the others stay. The control plane refuses another session's retrospective and keeps when it was updated (updated_at, migration 0025). Updates don't count toward the 50 a session records.
  • fctl retro list in a sandbox lists the session's own retrospectives with their ids. fctl retro now prints the id it recorded.
  • ~/AGENTS.md asks for one retrospective for each piece of work, not one for each turn. When a later turn carries on with work the session recorded one for (review comments, a failed check, an answer that unblocks it, the rest of a partial one), the agent updates that one, so that it tells the whole piece of work as it now stands. It checks fctl retro list before recording one, because a resumed run may start without its conversation. fctl-agent writes this only where the sandbox's fctl has fctl retro update (it runs fctl retro update --help). Older sandbox images keep the old text.
  • The transcript shows an update as a retrospective_updated notice with the retrospective as it now is. The notice from when it was recorded stays as it was, and fctl logs says "Retrospective updated".
  • The web app says when the agent last updated a retrospective ("Updated 1 minute ago", with both times in the tooltip). It does this on the session page and in the project's Retrospectives tab, and reads the session's list again when an update comes in live. The Retrospectives tab keeps the order retrospectives were recorded in, and its counts by outcome follow the updates. On phones, its rows put the time beside the outcome so that the longer label doesn't squeeze the session's title.
  • Protocol: Retrospective.updated_at (optional), and two new AgentCalls, update_retrospective and retrospectives (answered with AgentAnswer::Retrospectives). They are new calls rather than an option on retrospective, so an fctl-agent or control plane from before them refuses them and records no second retrospective. The host retries both, as it retries the other calls that change nothing when sent twice.
  • ADR 0038 says why agents may now change their own session's retrospectives while they still can't change notes. The architecture, CLI, development, security and sandbox image docs describe how it works.
  • fake-claude gets a new word, revise, which updates the session's newest retrospective through fctl retro list and fctl retro update. retro now takes partial and blocked. The smoke test records a partial retrospective and revises it, and checks that the session ends with one retrospective, completed and updated.

How I verified it

  • Unit tests for each piece:
    • domain: an update keeps the parts it doesn't mention, checks the ones it does, and refuses an empty update; the transcript messages
    • protocol wire formats
    • fctl-agent: the new calls are refused where a project asks for no retrospectives; an update gets a retrospective_updated notice; listing adds nothing to the transcript
    • the ~/AGENTS.md text, for an fctl with retro update and for one without
    • web: the list is read again when the transcript has a newer update; the transcript's update notice; the tab's time labels
  • cargo xtask check --quick passed, and so did cargo xtask dev --smoke. In the smoke run, the agent recorded a partial retrospective and updated it to completed, through fctl-agent, the host, the control plane and D1.
  • In cargo xtask dev, a session recorded a partial retrospective and a follow-up revised it: same id, outcome completed, the given parts replaced, the others kept. Acting as that session's agent:
    • fctl retro list listed it.
    • Updating another session's retrospective was refused: "This session recorded no retrospective rtr_…: fctl retro list lists those it did".
    • An update with nothing in it was refused, and so was an empty --worked-on ("Say what the work was").
  • Against an older fctl-agent (this sandbox's, v0.18.0), the new CLI's fctl retro list and fctl retro update get "fctl-agent did not understand the request: unknown variant retrospectives" (and update_retrospective). Nothing is recorded.

Screenshots

At 3333a3b, in the light theme: a session whose agent recorded a partial retrospective, then updated it to completed in a later turn. Before is main's web app on the same data.

The session page: the second notice now says "Retrospective updated", and the rail says when it was updated (1440 px).

Before After
Before: the session page, both notices say Retrospective After: the second notice says Retrospective updated, the rail Updated 1 minute ago

The project's Retrospectives tab: each entry says when its agent updated it (1440 px). The smoke test's session, #1, was updated too.

Before After
Before: the Retrospectives tab with recorded times After: the Retrospectives tab with Updated times

The same tab on a phone (390 px): the time moves beside the outcome, and the session's title keeps two lines.

Before After
Before: the tab on a phone After: the tab on a phone, Updated beside Completed

Other repositories

Made in the fctl session https://app.fctl.sh/s/ses_01M5JE2RW1PFHPGP1DP1WFPW0Y

fctl-sh Bot added 4 commits October 22, 2026 18:45
fctl retro update rtr_… changes a retrospective of the agent's own session
in place (the outcome and the parts given; the others stay), and fctl
retro list in a sandbox lists the session's own, through fctl-agent. The
control plane keeps when it was updated (migration 0025), the transcript
shows the update as a retrospective_updated notice, and ~/AGENTS.md asks
for one retrospective for each piece of work, updated as later turns
carry on with it, where the sandbox's fctl can update them.
fake-claude's revise updates the session's newest retrospective with fctl
retro list and fctl retro update, and retro takes partial and blocked.
The smoke test records a partial retrospective and updates it, and checks
the session ends with one, completed. The docs and ADR 0038 say why agents
keep one retrospective for each piece of work and update it.
Updated … ago is longer than the time it replaces, and squeezed the
session's title in the Retrospectives tab's rows at phone width. There the
time now sits beside the outcome, and the title gets a line of its own.
…ding one

A resumed run may start without its conversation, so ~/AGENTS.md asks the
agent to look at fctl retro list before it records a retrospective, and
update the one for the same work instead.
@kalaspuff
kalaspuff merged commit 0af81a6 into main Oct 22, 2026
9 of 10 checks passed
@kalaspuff
kalaspuff deleted the fctl/136-it-would-be-great-if-sessions-generally branch October 22, 2026 18:59
kalaspuff pushed a commit to hyperstructure/fctl-site that referenced this pull request Oct 22, 2026
…42)

Agents in app.fctl.sh's sessions now update the retrospective they
recorded as later turns carry on with the same work, instead of
recording another for each follow-up. The control plane keeps when each
retrospective was last updated (hyperstructure/fctl#211, ADR 0038). The
privacy policy's paragraph on project memory and retrospectives now says
so, as it already says who last changed a note and when.

What is kept and for how long doesn't change otherwise. Retrospectives
still last as long as their session, and what an update replaces stays
in the session's transcript, which the policy already covers. `updated`
in the front matter is already today's date.

Merge it once hyperstructure/fctl#211 is deployed to app.fctl.sh.

Made in the fctl session
https://app.fctl.sh/s/ses_01M5JE2RW1PFHPGP1DP1WFPW0Y

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant