Skip to content

bug: tmq re-dispatch silently reuses stale session command — new --provider/--model ignored #117

Description

@jakecelentano

Scope

tmq <repo> <issue> re-dispatch silently reuses the previous session's command — new --provider/--model flags are ignored when an aoe registration for the session title survives.

Repro (2026-07-20, feat-openagent#66):

  1. Original dispatch: tmq openagent 66 --agent pi --provider minimax --model MiniMax-M3 → session command carries MiniMax.
  2. Session hung; operator ran aoe session stop feat-openagent#66 (stop, not remove).
  3. Re-dispatch: tmq openagent 66 --agent pi --provider deepseek --model deepseek-v4-pro → tmq printed the normal "Spawned:" output, but aoe session show revealed the command was STILL pi --provider minimax --model MiniMax-M3 .... The wrong model ran for ~45 minutes before the mismatch was noticed via the pane's model indicator.
  4. Workaround that fixed it: aoe rm feat-openagent#66 --purge before re-dispatching — then the new flags took.

Root cause hypothesis: the deployed bash tmq's aoe rm --purge step before aoe add either fails silently or is skipped when the session exists in stopped state, so aoe add no-ops ("Session already exists with same title and path") and session start revives the stale command. The Python plugin (bogocat/tmq spawn.py) has the same rm→add→start sequence — verify whether it fails the same way.

Why it matters

Redispatch-after-kill is the standard recovery move for hung agents (twice today). A silent model/provider mismatch corrupts routing decisions AND provenance: the dispatch event logs the requested model while the served model differs — exactly the class of gap tms#74 and distillery's served-model provenance work exist to prevent.

Acceptance criteria

  • Re-dispatch over an existing (stopped or running) same-title session either fully replaces the registration (rm --purge that verifiably succeeds) or fails loud with instructions — never silently reuses the old command
  • Regression test: dispatch, stop, re-dispatch with different --model; assert the session command contains the new model
  • Same check ported to / verified in the Python plugin (bogocat/tmq)
  • Dispatch event row logs the command actually installed, not just the requested flags

References

  • 2026-07-20 wave: feat-openagent#66 double-dispatch incident (this issue's repro)
  • tms#74 (provider-only dispatch can log mismatched default model — sibling provenance gap)
  • bogocat/tmq spawn.py:151-183 (rm→add→start sequence in the Python port)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions