Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Coder tasks blocks message queueing for Claude Code module (UI and CLI) #20770

Description

@brittlewis12

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Coder tasks infrastructure blocks message queueing for the Claude Code module, both in the UI and CLI.

When attempting to send a message to an active task using coder exp task send while the agent is working, the command fails with a 502 error. The command only succeeds when the agent has yielded and is waiting for input.

Additionally, the Coder tasks UI completely disables text input while an agent is working, making it impossible to queue messages.

The core problem: Claude Code natively supports message queueing, but the Coder tasks infrastructure doesn't expose this capability. This creates a frustrating mismatch where the underlying agent can handle queued messages, but the Coder tasks UI/API prevents users from sending them.

Relevant Log Output

$ coder exp task send task-dazzling-euler-3879 "message here"
error: Trace=[send input to task: ]
unexpected non-JSON response "text/plain; charset=UTF-8"
error code: 502

Expected Behavior

For agents that support message queueing (like Claude Code):

  1. Users should be able to type/queue messages in the UI while the agent is working
  2. coder exp task send should successfully queue messages even when the agent is busy (no 502 error)
  3. Queued messages get processed by the agent after its current work completes

Steps to Reproduce

  1. Create a Coder task using the Claude Code module
  2. Start the task and let it begin working on something (task state: active / working)
  3. While the agent is actively working (before it yields), attempt to send a message either:
    • Via CLI: coder exp task send <task-name> "additional context here"
    • Via UI: Try to type in the input field
  4. Observe:
    • CLI returns 502 error
    • UI input field is completely disabled
  5. Wait for the agent to yield/pause
  6. Try sending again - now it works (confirming the agent can receive messages, just not while working)

Environment

  • Host OS: macOS (Darwin 24.6.0)
  • Coder version: v2.28.3+7beb95f (server), v2.28.0+1b1e3cb (CLI)
  • Module: claude-code (v3.4.4)
  • The task logs show previous interruptions worked (Interrupted · What should Claude do instead?), confirming the messaging mechanism exists but is restricted

Additional Context

  • The issue occurs consistently
  • This is a limitation/missing feature rather than regression - message queueing has never been exposed to Coder tasks

Suggested Solution

  1. Fix the 502 error in coder exp task send - allow message queueing to agents that support it
  2. Enable message queueing in UI for agents that support it (conditional based on module capabilities)
  3. Document which agents/modules support queueing vs interruption-only
  4. Consider a capability negotiation system so Coder tasks knows what each module supports

Notes

  • Understand this might be intentionally restricted since not all agents support queueing
  • But for Claude Code specifically, this is relaxing restrictions rather than adding new functionality
  • The agent already has the capability; the infrastructure just needs to allow it through

Activity

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions