Skip to content

Implement closeSession#113

Open
benbrandt wants to merge 6 commits intomainfrom
session-close
Open

Implement closeSession#113
benbrandt wants to merge 6 commits intomainfrom
session-close

Conversation

@benbrandt
Copy link
Copy Markdown
Member

Probably needs a close look as it ended up needing to touch more than I expected

Comment thread src/CodexAcpServer.ts Outdated
supportedReasoningEfforts: currentModel?.supportedReasoningEfforts ?? [],
supportedInputModalities: currentModel?.inputModalities ?? ["text", "image"],
agentMode: AgentMode.getInitialAgentMode(),
pendingTurnId: null,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can single session have two active turns? Can we reuse currentTurnId here?

Advertise ACP close capability and implement
`unstable_closeSession` to interrupt active turns, unsubscribe
threads, remove per-session listeners, and forget session state.
Store pending turn ids separately from turn completion so session
shutdown can interrupt only active turns and wait for them to finish.

Also scope app-server notifications to their thread and avoid sending
command/session updates after a session has been removed or is closing.
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.

2 participants