Sierra

Based on real interviews

Agent loop bug hunt

Review a short tool-calling loop that should return the model's final answer after using its tools.

Unlock with Full Access

The challenge

The implementation uses Chat Completions to run a tool-calling exchange. Follow how model responses, tool calls and their results move through the loop. Identify the bugs that prevent the exchange from behaving as intended, and explain targeted fixes without redesigning the agent.

What you'll practise

  • Conversation state

    Trace the information passed between the model and the application across turns.

  • Tool handling

    Inspect how requested tool calls are processed and their results returned.

  • Loop completion

    Check how execution moves from intermediate tool work to the final answer.

Your code-review workspacePreview
Agent loop implementationCode included in the full challenge
Your code review

Explain each bug, its effect on the exchange and the proposed fix.

The code, instructions and feedback are included with Full Access.