Keep an agent's session token after refs_release
refs_connect now points the clone at the refs credential helper, and refs_release leaves it there, so every push an agent makes goes out as its session: checked against its branch, or claiming the new branch it pushes. Only refs_end gives the clone back to the human's credentials.
1 decision
The CLI installs the session credential helper on refs_connect and removes it only on refs_end, not on refs_release.
Why
- After a release, agent pushes went out as the human, unchecked, and could not claim a branch.
- Aman chose to keep the token, accepting that his own pushes from that clone are limited while the session lives.
Paths considered
- Chosen
- Drop the token on release, as before
Touches
refs.mjssessions.tsmcp.tsref-protocol.md
6 files changed · +11 −13
apps/backend/mcp.ts+1 −1
apps/backend/sessions.ts+2 −4
apps/backend/test/sessions.test.ts+4 −4
apps/cli/refs.mjs+1 −1
apps/frontend/routes/llms-txt.ts+1 −1
docs/ref-protocol.md+2 −2