You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(traces): stamp opencode's session title on session spans
Session spans carry the id only, and an id like ses_fcc85048effeCXe1RvEetcywD4
tells a reader nothing. opencode names every session from its first prompt and
already ships that name in the session events, so the plugin can pass it on.
session.created is emitted before the name exists, so the title arrives with
session.updated a moment later. The handler records it and stamps it on the
spans that are still open for that session, the subagent session span and the
active run span, and handleRunStarted picks up a title that is already known
for runs that start afterwards. Sessions opencode has not named carry no
session.title at all, and an empty title never overwrites a known one.
The map is bounded like the other per-session state and swept on session.idle.
Signed-off-by: moep90 <volleyballlive@googlemail.com>
|`opencode.session`| One user turn, or a subagent session. Carries `session.id`, the prompt in `input.value`, and `session.title` once opencode has named the session |
72
+
|`opencode.llm`| One model turn, with model, token counts and finish reason |
73
+
|`opencode.tool.<name>`| One tool call, with its arguments in `input.value` and the result in `output.value`|
74
+
75
+
opencode names a session from its first prompt, shortly after the session
76
+
starts. The plugin picks that name up from `session.updated` and stamps it on
77
+
the spans that are still open, so a backend can show "Fix the flaky test"
78
+
instead of `ses_fcc85048effeCXe1RvEetcywD4`. Sessions opencode has not named
79
+
carry no `session.title` at all.
80
+
67
81
## Installation
68
82
69
83
Add the plugin to your opencode config at `~/.config/opencode/opencode.json`:
0 commit comments