Skip to content

fix(gateway): allow reply-only queue command - #56022

Open
rayjun wants to merge 1 commit into
NousResearch:mainfrom
rayjun:fix/queue-reply-only
Open

rayjun wants to merge 1 commit into
NousResearch:mainfrom
rayjun:fix/queue-reply-only

Conversation

@rayjun

@rayjun rayjun commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Allows a bare /queue command to enqueue reply context when it is sent as a reply to another message. The existing handler preserved reply_to_* fields after enqueueing, but its usage guard only allowed text or media payloads, so reply-only /queue returned Usage: /queue <prompt> before the queued event could be built.

Related Issue

Follow-up to #55960

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • gateway/run.py: treats reply context as a valid /queue payload even when there is no prompt text or media attachment.
  • tests/gateway/test_queue_command.py: adds a regression test for reply-only /queue, asserting the queued event keeps the reply metadata.

How to Test

  1. Start an active gateway session.
  2. Reply to an existing message with /queue and no additional text.
  3. Verify the message is queued instead of returning Usage: /queue <prompt>, and the follow-up turn retains the quoted message context.

Automated checks:

python -m pytest tests/gateway/test_queue_command.py -q
python -m ruff check gateway/run.py tests/gateway/test_queue_command.py

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Ubuntu 24.04 / Linux

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

N/A

Screenshots / Logs

$ python -m pytest tests/gateway/test_queue_command.py -q
......                                                                   [100%]
6 passed in 0.37s

$ python -m ruff check gateway/run.py tests/gateway/test_queue_command.py
All checks passed!

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Jul 1, 2026
@rayjun
rayjun force-pushed the fix/queue-reply-only branch from fa314c8 to 43a996e Compare July 4, 2026 06:20
@teknium1 teknium1 added the sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants