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
{{ message }}
Repository navigation
Sessions tab and codev session CLI decide 'running' differently #175
What. Two pieces of code read Claude Code's sessions/<pid>.json registrations and decide which sessions are running, and they use different rules:
Where
Reads
Decides "running" by
App, Sessions tab — readSessionRegistrations in src/live-sessions.ts
every account's sessions/*.json
the pid appears in the list of running claude processes
CLI, codev session list --live / self — readAllRegistrations / readRegistrations / isLive in src/cli/session-self.ts (#174)
the same files
the pid is alive and its start time equals the file's procStart
The app's rule can show a session as running when a leftover registration's pid has been reused by another claude process. The CLI's rule does not. A disagreement is silent: the two views just list different sessions.
Why not fixed in #174. Sharing the file parser alone would not make them agree, because the difference is the liveness rule. self's reader already existed before #174 as a second copy.
Suggested fix. Make src/cli/session-self.ts the one reader and the one isLive rule (the app can import from src/cli/; the CLI cannot import from the app). Have live-sessions.ts build on it: it already runs ps, so it can supply the start times. Then add a test that one fixture set gives the same running set through both paths.
🤖 On behalf of @grimmerk — generated with Claude Code
Activity