Agent repeatedly loops on unfulfilled STAR follow-up

Open Beginner friendly
#51 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
ai

Research direction

Start in prompts.rs, especially star_policy(), and reproduce the refusal flow described in the issue. Check how an unanswered STAR probe is retained across coding-block reviews; done means an explicit inability to provide an example ends that probe and prevents it from being re-asked.

Written by the indexing model from the issue text.

Description

Description

When conducting an interview session, if the candidate explicitly states they cannot recall an example for a behavioral question, the agent appears to get stuck in a logical loop, persistently re-asking the exact same question in every subsequent interview round.

Steps to Reproduce
  1. Candidate mentions a specific weakness (e.g., "I take longer to debug specific algorithms.") during the conversation.
  2. The Agent follows up using star_policy: "could you tell me about a time you had to debug a particularly tricky problem? Walk me through the situation"
  3. Candidate explicitly declines: "I can't think of an example right now."
  4. Agent pauses or ends the current dialog block.
  5. Candidate completes a block of code in the editor.
    6.Agent triggers a proactive review or reacts to the code, but prepends/appends the same unresolved behavioral question (This behavior seems to repeat indefinitely).
Expected Behavior

When a candidate explicitly states they cannot answer a behavioral probe, the agent should ideally recognize the refusal, silently abandon the attempt to collect that specific STAR evidence, and move on. It should obey the VOICE RULES and refrain from backtracking to re-ask an aborted question.

Actual Behavior

The agent appears to retain the unfulfilled STAR goal in its context window and repeatedly interrupts the coding flow to ask the exact same behavioral question after the candidate finishes writing code.

Suggested Investigation

When looking at prompts.rs, the star_policy() instructs the LLM to actively listen for Situation, Task, Action, and Result, and to prompt for any missing parts. However, I suspect the issue occurs because it lacks a clear fallback or exit condition for when a candidate is simply unable to provide an example.

Environment
Dominant language
Rust
Stars
54
Forks
8
Avg merge
9h 41m
Merged PRs (30d)
43

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sysprog21/codetrial

All issues in sysprog21/codetrial

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.