Repository navigation
[feat] Read the sessions of more tools, so they can be scored #1418
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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 agentsWhat 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,readSessionandexistingSessionId;writeSessionanddeleteSessionthrowToolUnavailableErrornaming the tool, as Cursor and OpenCode already do on paths they cannot write.teamai session migrate --targetinto such a tool fails with that message; nothing else changes for it. Qoder writes Claude Code's format, so it keeps the writerClaudeCodeAdapteralready has. - Each tool lands in its own PR, in the order of the table. The issue closes when every
readyandneeds workrow is done; thedeferred,unknownandblockedrows stay'none'or'unknown'inTOOLSwith a note saying why.
Acceptance criteria
- For each adapter added:
teamai session platformslists the tool, andteamai session push --source <platform> --scrubarchives its sessions for the current project with title, cwd, timestamps, user prompts, assistant replies and tool calls in order. teamai score --scorer <s> --session <id> --source <platform>labels a session of that tool, judged by an installed judge tool.- The Pi-family adapter reads both Pi's and OMP's files, including OMP's
titleline and its folder names, and takes the cwd from the session header. - Hermes and OpenClaw list only coding sessions, not chat-platform ones.
teamai session migrate --target <platform>into a read-only adapter fails with theToolUnavailableErrormessage and writes nothing.
Definition of done
TOOLS[tool].sessionsnames the new platform. The README scorers tick, in everyREADME*.md, follows:readme-matrix.test.tsfails until it does.docs/guide/tool-support.mdand its Chinese page regenerated withnpx vitest run tool-support -u.- The notes in
src/tools.tsmatch what is now known: Pi's version (1.4.0) andsessionDirsetting, an Oh My Pi note,QODER_CLI_HOMEfor Qoder, Muse's sessions underXDG_DATA_HOME. docs/guide/scorers.mdand 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 oneteamai score --session <id> --source <platform>on a real session of the tool.
Out of scope
- Which tool judges ([feat] Judge a session with the driver's own tool #1386).
- Decrypting Trae's IDE database.
- A zstd decoder for Node 20. OpenClaw and DeepSeek Harness wait for one, or for Node 22 as the floor.
- Writers for the new formats.
Dependencies
- Needs feat(sessions): resolve each tool's session store through locate (#1221) #1404 merged: it adds the
sessionsfacet toTOOLS([feat] One descriptor per tool, and one resolver for where teamai writes and where the tool reads #1221 F). - Independent of [feat] Judge a session with the driver's own tool #1386. Once both land, a session from any of these tools can also be judged by the driver's own tool.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
SaulMoro commentedon Oct 27, 2026
Two store paths in the table move with more than the variables listed, from the home rules pinned for #1221 (#1486):
PI_CONFIG_DIRandPI_PROFILE(read whenOMP_PROFILEis unset) move the store too, and a named profile ignoresPI_CODING_AGENT_DIR:DirResolvertakesprofile ? undefined : options.agentDirOverride(dirs.ts @ a70f001c). A named profile's sessions are under~/<PI_CONFIG_DIR or .omp>/profiles/<name>/agent/sessions.OPENCLAW_STATE_DIR,OPENCLAW_HOMEreplaces the home the state dir sits in, andOPENCLAW_PROFILEmakes it.openclaw-<profile>(environment, workspace).toolHomeresolves 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.feat(session): read Qoder and Qoder CN sessions (#1571)
SaulMoro commentedon Oct 30, 2026
Qoder and Qoder CN are done in #1571 (
1f3dd827):TOOLSnamesqoderandqoder-cn, the README scorers marks and the tool-support pages follow, and the stores resolve fromQODER_CONFIG_DIR/QODER_CLI_HOME/.qoderandQODERCN_CONFIG_DIR/QODERCN_CLI_HOME/.qoder-cn. Its real-CLI record coverssession migrateon a fixture store; asession pushandscorerun on a real Qoder session is still open for that row. The other rows stay open.SaulMoro commentedon Oct 30, 2026
JoyCode sessions are readable since #1572 (
cfd798e4).TOOLS.joycode.sessionsis['joycode'], andCodexAdapterreads JoyCode's rollouts under~/.joycode/sessions. Its real-CLI record coverssession migratefrom a fixture rollout. Asession pushandscore --sessionon a real JoyCode session were not run, andJOYCODE_HOMEis not followed yet. JoyCode was anunknownrow, so this does not change what closes the issue. Oh My Pi, Pi, Copilot CLI, Muse, Hermes and OpenClaw are still open. OpenClaw is markedneeds workbut is also listed as waiting on zstd, so it may belong indeferred.XY-code1 commentedon Oct 30, 2026
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.
SaulMoro commentedon Oct 31, 2026
JOYCODE_HOMEis now followed (#1622): the JoyCode session store resolves throughlocate, so it moves with the home (src/tools.ts:607).Still
'none'inTOOLS: Oh My Pi, Pi, Copilot, Muse, Hermes and OpenClaw.