Skip to content

D271 — an agent restarted under a new session renews its own hold (#498) - #501

Merged
napkinstack-agent[bot] merged 2 commits into
mainfrom
d271-agent-renews-its-own-hold
Nov 23, 2026
Merged

napkinstack-agent[bot] merged 2 commits into
mainfrom
d271-agent-renews-its-own-hold

Conversation

@napkinstack-agent

Copy link
Copy Markdown
Contributor

Workstream

D271, from #498. Its row is in docs/governance/workstreams.md.

What it changes

D185 (#315) tells the holders of a hold apart by session alone. Downstream, a multi-agent project restarted its workstation. Each agent's session id changed but its App did not, so the agents' deliverables read as held by another session:

  • K5 refused the pull request (attest 4/5);
  • nstack claim asked for a take-over on the decider's word, for work that never changed hands.
flowchart LR
  C[nstack claim, hold held by another session of the same person] --> T{--take-over?}
  T -->|yes| O[take-over, as before]
  T -->|no| A{in nstack agent run, and every session-bearing event committed by this session's global identity?}
  A -->|yes| R[renew: says the identity, records Hold-Previous, both sessions kept for K5]
  A -->|no| D[needs the decider's word, as before]
Loading

A hold's events now record who committed them. In an agent's session (nstack agent run), claim renews a hold that another session of the same person holds when every event that put a session on the hold was committed under this session's identity. That identity comes from the global git configuration, i.e. the agent's own App; a clone's local user.email does not count. The renewal states that identity and records the session it leaves in Hold-Previous. Two live sessions of one agent count as one holder.

Unchanged: one identity cannot tell apart another agent of the same person, or a person's own sessions outside nstack agent run. Those still take the hold with --take-over (#315). --take-over always records a take-over.

K5's Action, project.md and ADR-0007 now give the command that works:

nstack claim D30 --person @alice --session <it>

Not taken: checking whether the former session is gone. git sees no sessions, and the renewal written in the record makes the move visible.

Fresh verifier

Findings fixed in the second commit:

  • the command in K5 and project.md named no person and no session, so it was refused or left K5 refusing;
  • the session left behind was not recorded;
  • a clone's local identity could stand in for the agent's;
  • two mutants survived: one identity among several sufficed, and an event without a session counted its identity. A test now kills each of them.

What a project receives

The engine (hold.py, and K5's Action in pull_request.py) and .nstack/handbook/project.md. Nothing that was green turns red. An agent restarted under a new session renews its own hold without the decider's word.

Definition of Done

  • The behaviour is covered by a test that failed before: a restarted agent's claim was refused, and now renews with Hold-Previous. Further tests check that these are still refused:
    • another App;
    • a session outside an agent's;
    • a hold another identity put a session on;
    • a clone's local identity;
    • a hold whose sessions came from two identities.
  • Every failure names the rule, the place and the action (P6)
  • uv run bash platform/tests/run.sh green, on a committed tree
  • uv run nstack fitness green
  • Affected documentation updated
  • The workstream's row updated in the register
  • No private project named, no path of a workstation, no link into an assistant's session

🤖 Generated with Claude Code

napkinstack-agent Bot and others added 2 commits November 23, 2026 10:17
A restart changes an agent's session, never its App; D185 told holders
apart by session alone, so the agent's own deliverables read as another's.
In an agent's session, claim now renews a hold of the same person when every
event that put a session on it was committed under the identity this
session commits with; said, both sessions kept for K5. Another agent of the
person, or a person's own sessions, still take it over (#315).

Agent-Session: napkinstack-os-77
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eft recorded

K5's Action and project.md now give the command that renews:
nstack claim <id> --person <p> --session <it>. The renewal records the
session it leaves (Hold-Previous). The agent's identity must be the one its
own global configuration names, never a clone's local one. --take-over stays
a take-over. Two live sessions of one agent are said to be one holder.

Agent-Session: napkinstack-os-77
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot requested a review from a team as a code owner November 23, 2026 09:22
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