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
[Bug]: ACP session/request_permission during session/set_model fails session open and turn start (No active ACP turn) #26852
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Add a local-command ACP provider whose session/set_model asks the client for confirmation with session/request_permission before answering. Hermes Agent does this (hermes acp) when switching a session that already holds a large context: by default 100,000 tokens or more, controlled by model.switch_context_confirm_tokens.
In a long thread on that provider, change the model in the picker to a different model and send a message.
Or: leave the thread on the new model and press Retry after the provider session is closed, so T3 reopens it with session/load and then applies the thread's model.
Expected behavior
The agent's permission request is shown to the user (or answered as declined), and the model switch then succeeds, or fails on its own and leaves the thread on its previous model. The thread stays usable either way.
Actual behavior
T3 fails the agent's session/request_permission, so session/set_model fails, and the whole turn start or session open fails. Retrying repeats the same failure every time, so the thread can't be used until its model is changed back to the one the agent session was already on.
The permission handler in packages/provider-acp/src/server/adapter.ts routes the request through activeContext, which fails with No active ACP turn when no turn is active. During configureSession (called from openSession and turn start, before the prompt is sent), no turn is active yet, so there is nowhere for the request to go. This is still the case on main at dac8b11d.
Related, with a different trigger: #23552, where a v1 agent's continuation turn hits the same No active ACP turn guard.
Impact
Major degradation or frequent failure
Version or commit
T3 Code Nightly 0.1.4-nightly.20261028.3841 (server). Code path unchanged on main @ dac8b11.
Environment
Ubuntu 24.04 server, iOS app and web client. Provider: local ACP command running Hermes Agent 0.22.5 (hermes acp).
Logs or stack traces
# server.trace.ndjson, span rpc.method = session/set_model (repeated on every retry)"exit":{"_tag":"Failure","cause":"Error: ACP request handler failed for method 'session/request_permission' at AcpAdapterV2.openSession (file:///.../0.1.4-nightly.20261028.3841/t3:167529:32) at AcpAdapterV2.openSession (definition) (file:///.../t3:191063:17)# boot-service.log, when the switch happens at turn start insteadERROR orchestration V2 provider turn start failed ProviderAdapterTurnStartError: Failed to start run ... on acpRegistry provider thread ... at AcpAdapterV2.startTurn ... [cause]: AcpRequestError: ACP request handler failed for method 'session/request_permission'
The same failed session/request_permission appears 28 times in one day in boot-service.log, all from one thread retrying.
Workaround
Change the thread back to the model the agent session is already on, or start a new thread on the desired model. With Hermes, setting model.switch_context_confirm_tokens: 0 stops it asking, which avoids the request entirely.
Activity