Skip to content

Start a new Discord conversation with /new - #114

Merged
Anrahya merged 1 commit into
mainfrom
discord-new
Oct 27, 2026
Merged

Anrahya merged 1 commit into
mainfrom
discord-new

Conversation

@Anrahya

@Anrahya Anrahya commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Closes #112. Part of the 2026-10-02 pivot: Discord stays a thin chat surface, minimal but solid for day-to-day use.

What changes

  • The operator's message that is exactly /new (ignoring case and the bot mention; in a DM, a bound channel, an active thread, or with a mention) starts a new conversation. In one store transaction it records the message, makes a new task on the channel's agent current, and queues the reply "Started a new conversation." No turn runs and nothing reaches the node.
  • The earlier task is kept, and turns already queued or submitted on it still run and reply.
  • A current task that nothing has used yet is reused, so repeated /new adds no empty rows.
  • The new task is opened immediately, so an unbound thread keeps answering without a mention.
  • A redelivered /new (same message id) changes nothing. A guest's /new, or /new with more text, is an ordinary message.
  • The gateway now wakes reply delivery as well as the RCP link (Wake { turns, replies }). The channel lookup runs before /new, so an unseen thread's /new uses its parent channel's agent.
  • No schema change and no wire change.

Not in this PR

/cancel, /compact, /model, /reasoning and /status each need an RCP operation first, so the Android app gets them too.

Verification

  • scripts/check-module-size.sh, cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace: pass.
  • New tests:
    • routing: a new task on the same agent, a thread that still answers, a redelivery answered once, a guest's /new as a message;
    • queued work on the old task kept, /NEW with padding matched, /new please as a turn, a DM /new, reply delivery woken;
    • store: repeated /new keeps one unused task on the channel's agent;
    • live: the fake gateway delivers /new twice, one answer is posted and no command runs.
  • Mutation runs: 6 of 6 caught.
    • reply wake removed;
    • operator check removed;
    • no new task;
    • redelivery not ignored;
    • unused task not reused;
    • wrong agent.
  • Independent Sonnet review of the store change: no blockers or majors. I applied its minor findings:
    • the lookup now runs before /new;
    • an unused task is reused;
    • tests added for matching, DMs, queued work and the reply wake;
    • the matching rule is now documented.

The operator's message that is exactly /new (ignoring case and the
mention) starts a new task on the channel's agent and is answered without
running a turn. The earlier task is kept and its queued work still runs;
a current task nothing has used is reused, so repeated /new adds no rows.
A redelivered /new changes nothing, and a guest's /new or /new with more
text is an ordinary message.

Closes #112.
@Anrahya
Anrahya merged commit d41c338 into main Oct 27, 2026
6 checks 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.

Start a new Discord conversation with /new

1 participant