Skip to content

fake-claude doesn't report queued turns, so dev sessions look idle while answering #63

Closed

Description

@fctl-sh

What is wrong. In cargo xtask dev, when a message reaches fake-claude while it is still on a turn, the session shows idle while fake-claude answers that message. Two ways to see it: send a message to a session that limit paused (at the reset, fctl-agent sends its resume message and the waiting message right after each other), or send a message while a slow turn is streaming. The session goes idle after the first answer and stays idle through the second.

How it works now. After a result, fctl-agent keeps a session running when queued_turn_count is above 0 (on_claude_message in crates/fctl-agent/src/supervisor.rs). Claude Code sets that field to the sends still waiting in its command queue: "Greater than 0 means at least one more user turn (and result) follows without further input" (SDKResultMessage in @anthropic-ai/claude-agent-sdk). fake-claude answers each waiting message as a turn of its own, but its result doesn't include the field (Session::result in crates/fake-claude/src/main.rs). From fctl logs playground#1 --json, with the fix for #59:

13:12:59 user_message "limit again"
13:12:59 status paused "Waiting for the usage limit to reset"
13:13:00 user_message "hello while paused"
13:13:49 status running "Resuming after the usage limit reset"
13:13:50 assistant "I'll take a look at that. You asked: \"The usage limit has reset. …"
13:13:50 result success
13:13:50 status idle "Waiting for a message"
13:13:50 assistant "I'll take a look at that. You asked: \"hello while paused\". …"
13:13:51 result success

A message sent while a slow turn streams does the same: status idle comes after the first result, and the second answer follows with no status running.

What should happen

  • fake-claude's result carries queued_turn_count: the user messages already waiting on its stdin when the turn ends. Then the session stays running until it has answered the last one, as it does with Claude Code.

Compatibility. Development tooling only: nothing ships to hosts or the control plane.

Found while verifying #59.

Session: https://app.fctl.sh/s/ses_01M57HNYYJMEMYHPRKXVQPDN13

Activity

  1. added
    bug
    agents
    on Oct 18, 2026
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

    agentsbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions