Skip to content

Add trust mode timeout for ask_user questions - #645

Open
zikajk wants to merge 1 commit into
masterfrom
ask-user-trust-timeout
Open

zikajk wants to merge 1 commit into
masterfrom
ask-user-trust-timeout

Conversation

@zikajk

@zikajk zikajk commented Oct 12, 2026

Copy link
Copy Markdown
Member

Main problem

ask_user tool was always blocking, now it can be configured to timeout when in trust mode.

Description

New toolCall.askUser.trustModeTimeoutSeconds setting. When the chat is in trust mode and the user does not answer an ask_user question in time, the tool returns a non-error result that tells the LLM to continue with its best judgment and state its assumptions. The pending editor request is cancelled; clients close the question when the tool call finishes.

The remote messenger question result now implements Future, like the jsonrpc4clj request it wraps, so future-cancel also drops its pending entry and the editor request.

DEV note

ask-question always returns the BroadcastMessenger wrapper, so ask_user must cancel that wrapper on timeout, or each timeout leaves a registry entry and a waiting watcher thread.

Three possible solutions, first one chosen:

  1. question-result implements Future (chosen): ask_user only calls future-cancel, and the wrapper keeps the same contract as the jsonrpc4clj PendingRequest that it wraps.
  2. Call remote.messenger/answer-question! from ask_user: fewer lines, but features/ would depend on eca.remote for the first time, and it fails with test messengers that have no registry.
  3. Add a cancel-question method to IMessenger: clean, but it changes the protocol and every messenger and test stub must implement it.

  • I added a entry in changelog under unreleased section.
  • This is not an AI slop. (Please take a human time to write a comprehensive context about the problem, alternatives and rationale)

New `toolCall.askUser.trustModeTimeoutSeconds` setting. When the chat is
in trust mode and the user does not answer an ask_user question in time,
the tool returns a non-error result that tells the LLM to continue with
its best judgment and state its assumptions. The pending editor request
is cancelled; clients close the question when the tool call finishes.

The remote messenger question result now implements Future, like the
jsonrpc4clj request it wraps, so future-cancel also drops its pending
entry and the editor request.
@zikajk
zikajk requested a review from ericdallo October 12, 2026 14:54

This branch has not been deployed

No deployments
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.

1 participant