Skip to content

feat: route discuss messages through task queue for tracing#19

Merged
jacksoncage merged 2 commits intomainfrom
feat/discuss-traces
Mar 2, 2026
Merged

feat: route discuss messages through task queue for tracing#19
jacksoncage merged 2 commits intomainfrom
feat/discuss-traces

Conversation

@jacksoncage
Copy link
Owner

@jacksoncage jacksoncage commented Mar 1, 2026

Summary

  • Discuss/chat messages now flow through the task queue instead of running inline, so they appear in the trace UI with full trace events
  • Each discuss task gets a unique repo key (_discuss:<uuid>) to avoid blocking other tasks in the per-repo concurrency constraint
  • Worker handles discuss task type: skips repo clone/worktree, uses reposDir as workDir, caps at 5 turns

Test plan

  • All 369 tests pass
  • Send a discuss message via Telegram/Slack and verify it appears in /trace
  • Send multiple discuss messages concurrently and verify they run in parallel (not serialized)
  • Verify code tasks still work normally with repo worktrees

🤖 Generated with Claude Code

jacksoncage and others added 2 commits March 1, 2026 22:37
Discuss messages previously ran the runner inline, bypassing the task
queue entirely. This meant no traces were recorded and they were
invisible in the trace UI.

Now discuss messages are enqueued like other tasks with taskType
"discuss" and a unique repo key (_discuss:<id>) so they never block
each other or real repo tasks in the queue. The worker skips repo
clone/worktree setup for discuss tasks and uses maxTurns: 5.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When tasks are created within the same millisecond (common in CI),
identical created_at timestamps made sort order non-deterministic.
Adding rowid as a tiebreaker guarantees insertion-order determinism.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jacksoncage jacksoncage merged commit db19294 into main Mar 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant