Skip to content

Ask the user when a write's ids do not resolve #3808

Closed

Description

@malibio

Problem

When the local agent makes a write whose ids do not resolve, the turn ends on a tool error instead of asking the user.

Observed in the question-blocks-task scenario of eval:tasks (#3784): the model called create_relationship with the placeholder "Anoop's ID here" as an endpoint id. The call failed, the model did not recover, and the turn ended with the raw error. The user was never asked which node was meant.

This is not specific to tasks. Any write tool given an id that does not resolve (a placeholder, a name in place of an id, an id from an earlier turn that no longer exists) ends the same way.

Proposed direction

Use the pattern the loop already has for duplicate entities and declined work: a refused-result on the failing write, plus a turn-end backstop that composes a clarification (format_clarification, replace_turn_reply, ClarifyPrompt) when the model has not resolved it or asked itself.

  • Detect a write whose id arguments do not resolve to a node (the executor already reports this as a tool error; the loop needs a typed signal rather than string matching).
  • Let the model retry once with a resolved id (search first).
  • If the turn ends with the write still unresolved and the reply does not ask, ask the user which node was meant, offering the candidates a name search returns.

Acceptance

  • An unresolvable id on a write produces a typed refusal the loop can recognise.
  • A turn that ends with that refusal unresolved asks the user instead of surfacing the tool error.
  • Unit tests for the refusal, the backstop (asks / model already asked / write landed after), and a loop-level test that a corrected retry runs.
  • Verified in-process on the locked E4B for the question-blocks-task request.

Related: #3784 (the scenario that surfaced it).

Activity

  1. self-assigned this
    on Oct 14, 2026
  2. added a commit that references this issue on Oct 14, 2026
    2245761
  3. malibio commented on Oct 14, 2026

    @malibio
    CollaboratorAuthor

    Live E4B check of the unresolved-id path: with 'blocked_by' and two unknown ids the typed refusal fired and the backstop asked the user ("couldn't run the relationship creation: '' doesn't match any node. Which node did you mean?"). With the built-in 'mentions' relationship (the one the question-blocks-task scenario's model uses) the same call still ended on the raw 'FOREIGN KEY constraint failed' because the built-in path never checks that its endpoints exist. Fixing that in a follow-up PR. Separately: in 5/5 question-blocks-task reps on the merged build the model linked real ids with 'mentions' and never created the question task, so that scenario fails for a different reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions