Skip to content

[feat] Read the sessions of more tools, so they can be scored #1418

Open

Description

@SaulMoro

Why

teamai scores a session only when it can read the tool's transcript. Today that is Claude Code, Codex, Cursor, CodeBuddy, WorkBuddy and OpenCode (plus the internal builds). The other 14 agents in the README matrix show — under scorers, and no open issue adds them: #1385, #1386 and #1388 all leave "reading sessions of tools without an adapter" out of scope. #1386 lets any driver's tool judge; this issue lets teamai read more tools' sessions. Together they make scorers work for as many tools as possible.

 TOOLS[tool].sessions
-  qoder, qoder-cn, pi, omp, copilot, muse, hermes, openclaw   'none'
+  qoder, qoder-cn, pi, omp, copilot, muse, hermes, openclaw   ['<platform>']
 README matrix, scorers column
-  ✓ 6 agents
+  ✓ 14 agents

What each tool keeps

Evidence: v seen on a real install, s the tool's source or shipped bundle, d docs only. A third-party parser is a lead, not evidence.

Tool Store Format Reuse Evidence Feasibility
Qoder, Qoder CN ~/.qoder/projects/<cwd>/<id>.jsonl (QODER_CONFIG_DIR, QODER_CLI_HOME); ~/.qoder-cn/... (QODERCN_CONFIG_DIR) Claude Code transcript JSONL, Claude Code's cwd encoding, subagents under <id>/subagents/ ClaudeCodeAdapter with its own store, like claude-internal s (@qoder-ai/qodercli 1.1.78) ready
Oh My Pi ~/.omp/agent/sessions/<cwd>/<ts>_<id>.jsonl (PI_CODING_AGENT_DIR, PI_CODING_AGENT_SESSION_DIR, OMP_PROFILE) Pi v3 JSONL with a leading title line, folder names relative to $HOME, model_change.model one new Pi-family adapter v (OMP 18.12.6), s needs work
Pi ~/.pi/agent/sessions/--<cwd>--/<ts>_<uuid>.jsonl (--session-dir > PI_CODING_AGENT_SESSION_DIR > sessionDir setting > PI_CODING_AGENT_DIR) Pi v3 JSONL, model_change {provider, modelId} the same Pi-family adapter s (Pi 1.4.0) needs work
Copilot CLI ~/.copilot/session-state/<id>/events.jsonl + workspace.yaml (COPILOT_HOME); index in session-store.db event JSONL: session.start (cwd), user.message, assistant.message (tool requests, model in 1.0.x), tool.execution_*, session.model_change new adapter v (0.0.411 and 1.0.90 sessions), s, d needs work: undocumented format, fields differ between 0.0.x and 1.0.x
Muse ${XDG_DATA_HOME:-~/.local/share}/muse/sessions/YYYY/MM/DD/<id>/session.jsonl + session-index.db Muse's own event log, not Codex's. muse export --session <id> writes a versioned JSON document offline new adapter, xdg-data store as OpenCode; reading through muse export follows OpenCode's session export precedent s (Muse 1.4.13) needs work
Hermes $HERMES_HOME/state.db (SQLite, profiles under profiles/<name>/) sessions + messages tables, chat-completions shaped. hermes sessions export writes JSONL new adapter through hermes sessions export or read-only sqlite3; ids are not UUIDs (20250305_091523_a1b2c3d4), so idFormat gets a variant s, d needs work: filter out chat-platform sessions (source)
OpenClaw ~/.openclaw/agents/<id>/agent/openclaw-agent.sqlite (OPENCLAW_STATE_DIR) transcript_events rows, Pi-derived events (v4), each plain JSON or zstd new adapter, Pi-family message decoder s (2026.10.7) needs work: zstd is not in Node 20's node:zlib; most sessions are chat threads
DeepSeek Harness ~/.dsh/sessions/--<cwd>--/<id>/session.v<N>.jsonl[.zstd] event JSONL, zstd by default, format v0 → v3 released, v4 on master new adapter s (0.2.1-rc.2) deferred: pre-release only, zstd, format churn
Kiro ~/.kiro (KIRO_HOME) docs say SQLite keyed by directory; a third-party parser reads sessions/cli/<id>.jsonl — d unknown: needs a real install
ZCode reportedly ~/.zcode/cli/db/db.sqlite messages table undocumented — none unknown: needs ZCode's source
Trae, Trae CN IDE: ModularData/ai-agent/database.db, reportedly SQLCipher-encrypted. TRAE CLI 2.0: reportedly Codex rollouts under ~/.trae/cli/sessions — CLI 2.0: possibly CodexAdapter with a ~/.trae/cli store d IDE blocked (teamai does not recover keys). CLI 2.0 unknown
JoyCode not documented anywhere — — none unknown

Behavior

  • An adapter for these tools may be read-only. Scoring needs listConversations, readSession and existingSessionId; writeSession and deleteSession throw ToolUnavailableError naming the tool, as Cursor and OpenCode already do on paths they cannot write. teamai session migrate --target into such a tool fails with that message; nothing else changes for it. Qoder writes Claude Code's format, so it keeps the writer ClaudeCodeAdapter already has.
  • Each tool lands in its own PR, in the order of the table. The issue closes when every ready and needs work row is done; the deferred, unknown and blocked rows stay 'none' or 'unknown' in TOOLS with a note saying why.

Acceptance criteria

  1. For each adapter added: teamai session platforms lists the tool, and teamai session push --source <platform> --scrub archives its sessions for the current project with title, cwd, timestamps, user prompts, assistant replies and tool calls in order.
  2. teamai score --scorer <s> --session <id> --source <platform> labels a session of that tool, judged by an installed judge tool.
  3. The Pi-family adapter reads both Pi's and OMP's files, including OMP's title line and its folder names, and takes the cwd from the session header.
  4. Hermes and OpenClaw list only coding sessions, not chat-platform ones.
  5. teamai session migrate --target <platform> into a read-only adapter fails with the ToolUnavailableError message and writes nothing.

Definition of done

  • TOOLS[tool].sessions names the new platform. The README scorers tick, in every README*.md, follows: readme-matrix.test.ts fails until it does.
  • docs/guide/tool-support.md and its Chinese page regenerated with npx vitest run tool-support -u.
  • The notes in src/tools.ts match what is now known: Pi's version (1.4.0) and sessionDir setting, an Oh My Pi note, QODER_CLI_HOME for Qoder, Muse's sessions under XDG_DATA_HOME.
  • docs/guide/scorers.md and its Chinese page list the tools whose sessions can be scored, if they list them.
  • Real-CLI record per PR: teamai session push --source <platform> and one teamai score --session <id> --source <platform> on a real session of the tool.

Out of scope

Dependencies

Activity

  1. SaulMoro commented on Oct 27, 2026

    @SaulMoro
    CollaboratorAuthor

    Two store paths in the table move with more than the variables listed, from the home rules pinned for #1221 (#1486):

    • Oh My Pi: PI_CONFIG_DIR and PI_PROFILE (read when OMP_PROFILE is unset) move the store too, and a named profile ignores PI_CODING_AGENT_DIR: DirResolver takes profile ? undefined : options.agentDirOverride (dirs.ts @ a70f001c). A named profile's sessions are under ~/<PI_CONFIG_DIR or .omp>/profiles/<name>/agent/sessions.
    • OpenClaw: besides OPENCLAW_STATE_DIR, OPENCLAW_HOME replaces the home the state dir sits in, and OPENCLAW_PROFILE makes it .openclaw-<profile> (environment, workspace).

    toolHome resolves both, so an adapter can take the store root from it rather than from the variables.

    For DeepSeek Harness, each shell call gets DSH_SESSION_ID (shell-env @ 22ddee37), which could name the current session once the adapter exists.

  2. SaulMoro commented on Oct 30, 2026

    @SaulMoro
    CollaboratorAuthor

    This was generated by AI during triage.

    Qoder and Qoder CN are done in #1571 (1f3dd827): TOOLS names qoder and qoder-cn, the README scorers marks and the tool-support pages follow, and the stores resolve from QODER_CONFIG_DIR / QODER_CLI_HOME/.qoder and QODERCN_CONFIG_DIR / QODERCN_CLI_HOME/.qoder-cn. Its real-CLI record covers session migrate on a fixture store; a session push and score run on a real Qoder session is still open for that row. The other rows stay open.

  3. SaulMoro commented on Oct 30, 2026

    @SaulMoro
    CollaboratorAuthor

    This was generated by AI during triage.

    JoyCode sessions are readable since #1572 (cfd798e4). TOOLS.joycode.sessions is ['joycode'], and CodexAdapter reads JoyCode's rollouts under ~/.joycode/sessions. Its real-CLI record covers session migrate from a fixture rollout. A session push and score --session on a real JoyCode session were not run, and JOYCODE_HOME is not followed yet. JoyCode was an unknown row, so this does not change what closes the issue. Oh My Pi, Pi, Copilot CLI, Muse, Hermes and OpenClaw are still open. OpenClaw is marked needs work but is also listed as waiting on zstd, so it may belong in deferred.

  4. XY-code1 commented on Oct 30, 2026

    @XY-code1
    Contributor

    I'd like to take the Pi / Oh My Pi part of #1418 as one focused PR. Plan: add one shared read-only Pi-family session adapter; cover Pi v3 JSONL and OMP's leading title record; resolve both stores through the existing tool-home rules; preserve message/tool-call order and model changes; add fixture-based adapter and read-only target tests; update TOOLS, generated support docs, and README matrices; and include a real-CLI verification where the local tools available here permit it. I will keep the other tools in #1418 out of scope.

  5. SaulMoro commented on Oct 31, 2026

    @SaulMoro
    CollaboratorAuthor

    This was generated by AI during triage.

    JOYCODE_HOME is now followed (#1622): the JoyCode session store resolves through locate, so it moves with the home (src/tools.ts:607).

    Still 'none' in TOOLS: Oh My Pi, Pi, Copilot, Muse, Hermes and OpenClaw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions