Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

HITL: Improve message attribution and transparency for REJECT and MODIFY flows #417

Description

@Hansehart

Problem

User feedback in HITL decisions should be attributed as user messages, not embedded in tool messages. Currently, both REJECT and MODIFY flows mix user intent with system status.

Current vs Proposed Message Flow

REJECT

Current:

user: "What about Hansehart?"
assistant: [tool call: search("Hansehart")]
tool: "Tool 'search' rejected by user: I don't want to search, just answer from knowledge"  ← user feedback hidden in tool msg
assistant: "Hansehart is..."

Proposed:

user: "What about Hansehart?"
assistant: [tool call: search("Hansehart")]
tool: "Tool 'search' rejected by user"
user: "I don't want to search, just answer from knowledge"  ← proper attribution
assistant: "Hansehart is..."

MODIFY

Current:

user: "What about Hansehart?"
user: "The parameters for tool 'search' were updated to: {query: 'Hansehart founding date'}"  ← original intent hidden
assistant: [tool call: search("Hansehart founding date")]
tool: [result]

Proposed:

user: "What about Hansehart?"
assistant: [tool call: search("Hansehart")]  ← original intent visible
tool: "Awaiting user decision"
user: "Make the query more specific: founding date"  ← user feedback as user msg
assistant: [tool call: search("Hansehart founding date")]
tool: [result]

Why This Matters

  • Semantic correctness: User input should have role: user
  • LLM behavior: Models weight user messages as instructions
  • Transparency: LLM sees what it originally tried + why user intervened

Reference

The MODIFY case already creates a user message for feedback (strategies.py#L629), but REJECT embeds feedback in the tool message (strategies.py#L615). Both should consistently use user messages for user-provided feedback.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions