Skip to content

[Bug] isOnboarded (chat_onboarding_completed) flag set too early #591

Closed

Description

@graycyrus

Summary

The chat_onboarding_completed flag can be flipped to true before the user has meaningfully engaged with the onboarding conversation.

Problem

In src/openhuman/tools/impl/agent/complete_onboarding.rs, the complete action sets chat_onboarding_completed = true whenever the welcome agent decides to call it. The current prompt (prompt.md) tells the agent to call complete after the first real engagement, but the agent can call it prematurely — especially after just sending template messages and one LLM response, without the user having connected any skills or having a real back-and-forth.

Steps to reproduce:

  1. Complete the UI onboarding wizard
  2. Land in the conversation view
  3. Wait for welcome agent messages (template + LLM)
  4. Observe chat_onboarding_completed is already true before any user interaction

Expected: Flag stays false until the user has had a meaningful onboarding conversation (at least 3 exchanges, or connected a skill).

Platform: All (desktop — Tauri)

Solution

Add guard logic in the complete_onboarding tool's complete action:

  • Only succeed if at least one of: (a) user has connected at least one skill (via Composio), or (b) agent has had at least 3 back-and-forth exchanges
  • The check_status action should return a ready_to_complete boolean based on these criteria
  • Reject premature complete calls with a descriptive error so the agent knows to keep conversing

Acceptance criteria

  • Guard logic — complete_onboarding({"action": "complete"}) rejects if minimum engagement criteria not met
  • Status indicator — check_status returns ready_to_complete: bool reflecting whether criteria are met
  • Regression safety — Unit test covering premature completion rejection

Related

  • Files: src/openhuman/tools/impl/agent/complete_onboarding.rs, src/openhuman/agent/agents/welcome/prompt.md
  • Part of: Conversational onboarding agent epic

Parent: #599 — Conversational onboarding agent

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions