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
High/Medium issues remain: Command Code parsing is registered, but the sync engine does not yet process or incrementally classify Command Code session files.
High
internal/sync/engine.go:2886 - processFile never dispatches parser.AgentCommandCode, so discovered Command Code files fall through to unknown agent type: commandcode and cannot be synced.
Fix: Add case parser.AgentCommandCode: res = e.processCommandCode(file, info) and cover it with an engine-level sync/dispatch test.
Medium
internal/sync/engine.go:842 - classifyOnePath has no Command Code path classifier, so fsnotify-driven SyncPaths ignores changes under .commandcode/projects even after the agent is registered.
Fix: Add a Command Code classifier for <projectsDir>/<slugified-cwd>/<session-id>.jsonl, excluding checkpoint/prompt sidecars, plus a classify test.
Summary verdict: two medium sync/persistence issues remain; no high or critical findings were reported.
Medium
Location: internal/parser/commandcode.go:266 Problem: DisplayName is populated from .meta.json, but the sync path never copies ParsedSession.DisplayName into db.Session. toDBSession only copies FirstMessage, so Command Code titles are dropped after SyncPaths/sync and never reach the UI. Fix: Copy non-empty pw.sess.DisplayName into s.DisplayName during toDBSession. UpsertSession already preserves existing display names on conflict, so this can remain insert-only.
Location: internal/sync/engine.go:863 Problem: Command Code depends on a sibling <session>.meta.json for title and fallback cwd/project data, but sync dispatch only classifies <session>.jsonl, and processCommandCode skips based only on the JSONL file’s size/mtime. If the meta file is written after the transcript or later changes due to a rename, the watcher ignores it and full sync skips the unchanged JSONL, leaving stale or missing metadata. Fix: Classify .meta.json changes by remapping them to the matching .jsonl, and use combined JSONL+meta file info or another sidecar-aware invalidation path for shouldSkipByPath.
Medium-severity issues found; no High or Critical findings.
Medium
internal/db/sessions.go:960 - display_name backfills whenever the stored value is NULL, which makes an explicit user clear non-sticky. RenameSession(id, nil) clears the title, but the next sync of a Command Code session with metadata restores excluded.display_name, so users can no longer clear parser-provided titles.
Fix: Distinguish “never populated” from “user cleared” before backfilling, for example with an explicit metadata flag/sentinel or by limiting this backfill to rows that have not had display-name user management applied.
internal/sync/engine.go:2254 - Command Code’s .meta.json mtime is only considered inside processCommandCode; SyncAllSince filters discovered files using discoveredFileMtime, which still stats only the .jsonl. If a metadata file arrives or changes while the watcher is not running, the unchanged transcript is filtered out before it can be reparsed, leaving display_name, cwd, and project metadata stale until a full sync.
Fix: Make the Command Code effective mtime available to pre-filtering paths, and also use it from SourceMtime so fallback polling sees sidecar-only changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing