Skip to content

Plugin: add a persistent thread status control card #12

@huntharo

Description

@huntharo

Problem

When a thread is resumed, or when /codex_status is run, we should show a richer pinned status/control surface instead of only plain text.

This needs to behave like a durable thread control card, not a one-shot reply.

Current Findings

  • The plugin already has most of the raw primitives:
    • /codex_status
    • /codex_fast
    • /codex_model
    • /codex_permissions
    • /codex_compact
    • /codex_rename
  • Resume/bound summary messages are already pinned in Telegram/Discord.
  • Current status output already includes model, service tier, approval policy, sandbox, project/worktree folder, and context usage.
  • The plugin already knows how to rename supported Discord channels / Telegram topics.
  • Stored binding state only persists one pinned message reference plus context usage. It does not currently persist thread-level fast/model/permission preferences in local plugin state.
  • Current callbacks support set-model and rename-thread, but there are no status-card callbacks yet for toggling fast mode, permissions, compact, or sync-name.
  • Upstream App Server thread status supports active flags for waitingOnApproval and waitingOnUserInput, which are useful for a status card.

Proposed Scope

  • Keep one pinned "thread controls" message per bound conversation when possible.
  • Add buttons for:
    • sync thread/topic name
    • fast on/off
    • permissions mode toggle
    • compact
    • maybe model selection
    • maybe dismiss buttons
  • On /codex_status, /codex_model, /codex_fast, /codex_permissions, and /codex_compact, refresh the pinned card if it still exists.
  • Treat stale button messages as acceptable; callbacks should re-read current thread state instead of assuming local state is still accurate.
  • Include current context usage on the compact control if available.

Source Notes

  • Command registration list: index.ts:5
  • Fast command: src/controller.ts:1376
  • Model command: src/controller.ts:1406
  • Permissions command: src/controller.ts:1463
  • Rename command: src/controller.ts:1510
  • Bound summary pinning: src/controller.ts:3192
  • Status text builder: src/controller.ts:3213
  • Stored binding schema: src/types.ts:250
  • Callback action union: src/types.ts:290
  • Status formatting: src/format.ts:194
  • App Server thread status shape: codex-rs/app-server-protocol/schema/typescript/v2/ThreadStatus.ts:6
  • App Server active flags: codex-rs/app-server-protocol/schema/typescript/v2/ThreadActiveFlag.ts:5
  • Upstream /status and /fast are client-side concepts: /Users/huntharo/github/codex/status-fast-app-server-notes.md:5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions