Feature request: auto-archive sessions when linked PRs are merged
The session list can get unwieldy - it would be great to have sessions that open pull requests auto-archived if they open a pull request and that pull request is later merged. This should be possible for GitHub when the the github app is configured for the matching pull request events.
from some initial exploration a few weeks ago I think this would require indexing the PR artifact beyond the session so we can lookup based on repo + PR number. The control plane doesn't seem to expose a session lookup by PR endpoint today.
We could support this, but automatically archiving a session when a linked PR is merged would conflict with another supported workflow: a single session can create multiple pull requests, including additional PRs after an earlier one has merged. I believe the multi-pr per session functionality was added after this issue.
Because a merged PR does not necessarily mean the session is finished, we would not want to make this the default behavior. This could potentially work as an opt-in setting, but we would need to ensure it does not disrupt multi-PR sessions.
I think I generally agree. I wrote this before multi PR support.
perhaps just removing the session from "needs attention" if all opened PRs are resolved (merged/closed) would be enough.
🤔 , for now, will keep the behavior as is, as the original issue intent is less problematic now with multi-pr. I want to avoid mixing semantics of the "needs attention" which == "unread agent output" and tying that to a PR resolution.