You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Optional hook to checkpoint a conversation when its Claude account changes #32054
When a managed Claude account is switched (by hand, or automatically once #28044 lands) and a Native Chat conversation continues on the new account, the context carries over only through Orca's own resume. Teams that keep durable per-project memory outside Orca (a memory service, a notes repo, a ticket) have no point at which to record what each conversation was doing before the account changed. The new account starts from the transcript alone, and anything the old session knew but never wrote down is easy to lose, especially when the switch happened because of a usage limit in the middle of a task.
This is the shared-install case from #20512: several people, each with their own subscription, one Orca.
Proposed solution
An opt-in, provider-neutral hook, off by default. Nothing in Orca would depend on any particular memory tool.
A single setting names an executable (no shell) to run when Orca is about to continue a conversation on a different account.
It receives a small JSON document on stdin: conversation id, workspace path, provider, old and new account ids, the reason (manual or usage-limit), and a bounded plain-text summary of the recent turns and open work.
It may print a short text block on stdout. If it does, Orca includes that text in the continuation message sent to the new account. If it fails, times out, or prints nothing, Orca continues exactly as it does today.
A hard timeout and an output size cap. The hook is never given account secrets.
I have a working prototype of this in a local build, with a local memory service as the reference implementation (a small script outside the Orca tree). I would only send a PR after agreeing on the shape here, and I would stack it on #28044 because it needs the account-switch event that PR introduces.
Alternatives or additional context
Keeping the script outside Orca and watching the account setting. It cannot see per-conversation state or run before the continuation is sent.
Writing the summary inside Orca. That would tie Orca to one memory format, which I'd rather avoid.
Questions for maintainers: is a command hook acceptable, or would you prefer a documented event on the existing runtime/CLI surface? And should it run only on an account switch, or on any restart of a Claude session?
Activity