Bug
The plugin stops generating titles on OpenCode >= 1.2.20 because the event it listens for no longer fires.
Root Cause
The plugin's event handler checks for:
event.type === "session.status" && event.properties.status.type === "idle"
In OpenCode 1.2.20+, the SDK replaced this with a dedicated session.idle event:
export type EventSessionIdle = {
type: "session.idle";
properties: {
sessionID: string;
};
};
The old session.status event with status.type === "idle"" is no longer emitted, so the plugin's event handler never fires. The log directory (~/.config/opencode/logs/smart-title/`) is never created and no titles are generated.
Fix
Update the event check to handle both the legacy and new event shapes:
if (
(event.type === "session.idle") ||
(event.type === "session.status" && event.properties.status?.type === "idle")
) {
Environment
- OpenCode: 1.2.20
- Plugin: latest (
@tarquinen/opencode-smart-title)
- Confirmed by checking
EventSessionIdle in @opencode-ai/sdk/dist/gen/types.gen.d.ts
Bug
The plugin stops generating titles on OpenCode >= 1.2.20 because the event it listens for no longer fires.
Root Cause
The plugin's event handler checks for:
In OpenCode 1.2.20+, the SDK replaced this with a dedicated
session.idleevent:The old
session.statusevent withstatus.type === "idle"" is no longer emitted, so the plugin's event handler never fires. The log directory (~/.config/opencode/logs/smart-title/`) is never created and no titles are generated.Fix
Update the event check to handle both the legacy and new event shapes:
Environment
@tarquinen/opencode-smart-title)EventSessionIdlein@opencode-ai/sdk/dist/gen/types.gen.d.ts