Skip to content

Agent loses context for short replies to the previous message #1269

@Al629176

Description

@Al629176

Summary

Agent does not preserve conversational context from the previous response.

Problem

When the agent asks a follow-up question and the user replies with a short answer like yes, the agent does not understand what the user is agreeing to.

Expected behavior is that the agent should use the immediately previous assistant message and conversation state to resolve short replies such as yes, no, do it, continue, or that one.

Steps to reproduce:

  1. Open a chat with the agent.
  2. Let the agent ask a follow-up question, such as Want me to dig into either of those Sentry panics?
  3. Reply with yes.
  4. Observe that the agent says it does not know what yes refers to instead of continuing from the prior context.

Environment:

  • Desktop app
  • Platform/version unknown

Solution optional

Investigate recent-turn context assembly, conversation history windowing, summarization, and any prompt/router step that may drop the previous assistant message before the next user response is processed.

Acceptance criteria

  • Repro gone - Short user replies like yes/no/continue correctly reference the immediately previous assistant prompt.
  • Regression safety - Unit, integration, or E2E coverage added or updated for follow-up cue resolution.
  • Diff coverage >= 80% - Fix PR meets changed-lines coverage gate.
  • Context preservation - The previous assistant message is available to the agent when interpreting short follow-up replies.
  • No overreach - The agent should ask for clarification only when prior context is genuinely ambiguous or missing.

Related

Screenshot provided showing the agent asks whether to dig into Sentry panics, user replies yes, and the agent loses context.

Metadata

Metadata

Labels

agentBuilt-in agents, prompts, orchestration, and agent runtime in src/openhuman/agent/.mcp-rpcMCP transport, tool registry, JSON-RPC, and core relay surfaces.priority: highImportant work that should be pulled forward.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions