Identities for entities did.bot

feat(agentd)!: poll for sign-ins only while a context works #2629

Merged permadeath.com
targeting main from claude/agentd-stale-contexts
Merged opened by and assigned to permadeath.com
targeting main from claude/agentd-stale-contexts

Agentd now long-polls bot.did.listPendingAuthorizations only for contexts that are working. A poll stops when its context rests or ends, or when its session ends, which also stops that session's subagents. It restarts at the context's next start or tool call. A context quiet for IDLE_AFTER (24 h) stops being polled too, as a backstop for processes that die without reporting, and a restart follows only contexts that may still be working.

Subagents never report "ended", so their polls ran until the 30-day expiry. On one host that was 387 open polls, 292 of them for contexts silent over a day. Each holds one of pds.did.bot's 512 request slots for 25 s, which queued every other request for 7–9 s. After this change, polls track the contexts actually working.

didbot oauth pending --all no longer lists unseen requests for contexts that aren't working; approving by URL still works.

🤖 Generated with Claude Code

Commits 0