Skip to content

[Feature]: Stamp originating session_id on kanban tasks created during ACP sessions #23199

@awizemann

Description

@awizemann

Problem or Use Case

Use case

Building Scarf, a macOS GUI for Hermes. We
want to show a per-chat Kanban view: while a user has a /goal running, they
can open a board scoped to "tasks this chat is producing."

What's missing

There's no wire-level link between an ACP chat session and the kanban tasks it
creates:

  • tasks table has no session_id / acp_session_id column.
  • kanban_create stamps created_by = HERMES_PROFILE but no session id.
  • hermes kanban list accepts --mine / --assignee / --status / --tenant
    / --archived — no --session.
  • ACP doesn't propagate a session-id env into the agent loop, so even adding a
    column wouldn't auto-populate without a tool-side change.

The closest available scope is tenant, which is per-project. That breaks down
for multiple concurrent chats in the same project, chats with no project (tenant
NULL), and distinguishing tasks from different goal-runs in the same chat.

Impact

Clients (Scarf and anyone else building UIs over Hermes) can render an honest
chat-scoped board. Without it, we're stuck with tenant + a client-side
created_at >= heuristic that imprecisely overlaps with other concurrent
agents on the same tenant.

Related context (not part of this ask)

The kanban toolset is currently gated on HERMES_KANBAN_TASK (worker spawn) OR
kanban in the profile's toolsets. The default platform_toolsets.cli
doesn't include kanban, so a user running /goal … in hermes acp has zero
kanban tools in their function schema — the agent can't decompose into kanban
tasks even if it wanted to. Scarf will surface that gating in its own UI; just
flagging it here for context, since session linkage only becomes useful once
chat-driven creation is happening.

Happy to send a PR if there's interest in the shape.

Proposed Solution

Proposed minimal change

  1. Add session_id TEXT to tasks with an index. Backwards compatible
    (NULL on existing rows and non-ACP-driven rows).
  2. Expose the originating session id to kanban tools when a call comes from an
    ACP session — HERMES_SESSION_ID env is the natural shape (same pattern as
    HERMES_KANBAN_TASK).
  3. kanban_create reads HERMES_SESSION_ID and stamps it on the new task.
  4. hermes kanban list accepts --session <id>.
  5. kanban show --json and kanban watch --json include session_id in the
    output.

Alternatives Considered

No response

Feature Type

New tool

Scope

None

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/acpAgent Communication Protocol adaptercomp/pluginsPlugin system and bundled pluginssweeper:implemented-on-mainSweeper: behavior already present on current maintype/featureNew feature or request

    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