Skip to content

Bug: openclaw workboard list CLI does not filter archived cards (CLI/API inconsistency) #94555

Description

@ecican

Bug: openclaw workboard list CLI does not filter archived cards (CLI/API inconsistency)

Summary

The openclaw workboard list CLI command does not hide soft-archived cards, while the workboard_list MCP tool / API does (when includeArchived is unset). This makes the CLI and API inconsistent and causes users to think archive operations failed.

Reproduction

  1. Create a card:
    openclaw workboard create "demo card"
    # → 3c97c81a  todo  ...
  2. Soft-archive it (e.g. via the workboard tool path that sets archived_at, or via direct DB write):
    sqlite3 ~/.openclaw/plugins/workboard/workboard.sqlite \
      "UPDATE workboard_cards SET archived_at = $(date +%s)000 WHERE id='3c97c81a-…';"
  3. Run openclaw workboard list --json → the JSON output shows "metadata": { "archivedAt": 1781780622000 } (good, archive registered).
  4. Run openclaw workboard list (no flags) → the archived card is still printed (BUG).

Expected

openclaw workboard list should hide cards with metadata.archivedAt set, matching the API tool's default behavior.

Root cause

In cli-D90w1uNl.js (function registerWorkboardCli, the workboard.command("list") handler):

workboard.command("list").description("List Workboard cards")
    .option("--board <id>", "Board id")
    .option("--status <status>", "Filter by status")
    .option("--json", "Print JSON", false)
    .action(async (options) => {
        let cards = await params.store.list({ boardId: options.board });
        if (options.status) cards = cards.filter((card) => card.status === options.status);
        writeCards(cards, options);
    });

There is no filter on card.metadata?.archivedAt.

Compare with the API tool path in extensions/workboard/index.js (~line 263, workboard_list):

return jsonResult({
    cards: (await store.list({ boardId }))
        .filter((card) => record.includeArchived === true || !card.metadata?.archivedAt)
        .filter((card) => !status || card.status === status)
        ...
});

Same store, different filter rules — that's the inconsistency.

Suggested fix

Add an --include-archived flag (mirroring the API tool) and default to hiding archived cards in the CLI:

workboard.command("list")
    .description("List Workboard cards")
    .option("--board <id>", "Board id")
    .option("--status <status>", "Filter by status")
    .option("--include-archived", "Include archived cards (default false)")
    .option("--json", "Print JSON", false)
    .action(async (options) => {
        let cards = await params.store.list({ boardId: options.board });
        if (!options.includeArchived) cards = cards.filter((card) => !card.metadata?.archivedAt);
        if (options.status) cards = cards.filter((card) => card.status === options.status);
        writeCards(cards, options);
    });

Environment

  • OpenClaw version: 2026.6.8 (844f405)
  • Plugin: workboard (bundled, version 2026.6.8)
  • Platform: macOS Darwin 25.5.0 (arm64)

Notes

Discovered while running through a card create/list/cleanup demo. Users who try to "archive" demo cards via the workboard tool will still see them in CLI output, leading them to think archive did not work — until they notice the CLI/API divergence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions