Skip to content

Improve channel resolution and ambiguity handling #104

Description

@joshka

Parent: #100

Related Gitcrawl context: openclaw/gitcrawl#81

Observed Workflow

While using Discrawl through Codex, channel-name resolution was sometimes brittle. A bare channel name like help could be ambiguous or collide with command/help parsing expectations, while using the numeric channel id worked reliably.

A local helper eventually encoded the numeric channel id for a common #help workflow, which made repeated queries much more reliable.

Current Workaround

The current workaround is to remember or manually discover numeric channel ids, then use those ids in discrawl search and discrawl messages.

This is reliable once known, but it makes repeated agent workflows depend on external notes or project-specific helper scripts.

Request

Improve channel resolution and ambiguity handling.

Example shape:

discrawl channels resolve help --json
discrawl search --channel help --explain-resolution "query"
discrawl messages --channel help --last 40

Useful Behavior

  • if a channel name is ambiguous, print matching guild/channel ids instead of failing tersely
  • prefer exact id matches when the input is numeric
  • show which channel was selected in JSON output
  • include enough context for Codex to retry with the right id
  • document that numeric ids are the safest stable input for repeated workflows

Why This Matters

Codex-assisted archive use works better when command failures provide the next exact command. Ambiguous channel names are common in Discord, and a generic local archive tool should make it easy to move from "I know the visible name" to "I have the stable id."

Acceptance Criteria

  • A command can resolve channel names to ids in JSON.
  • Ambiguous name errors include candidate ids.
  • Query commands expose selected channel id/name in JSON output where practical.
  • Docs recommend numeric ids for repeatable agent workflows.

Prepared with Codex, confirmed as accurate by human.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions