Project
cortex
Description
cortex sessions truncates session timestamps to 16 bytes (timestamp[..16]), producing YYYY-MM-DD HH:MM (no seconds). cortex export (session picker) truncates to 19 bytes (timestamp[..19]), producing YYYY-MM-DD HH:MM:SS (with seconds). The same session viewed through these two commands displays different date precision, confusing users who try to cross-reference sessions between them.
In src/cortex-cli/src/cli/handlers.rs line 806-807:
let date = if session.timestamp.len() >= 16 {
session.timestamp[..16].replace('T', " ")
In src/cortex-cli/src/export_cmd.rs line 268-269:
let date = if session.timestamp.len() >= 19 {
session.timestamp[..19].replace('T', " ")
Both operate on the same SessionInfo objects returned by list_sessions(), so the source timestamp is identical. The only difference is the hard-coded slice length: 16 vs 19.
Error Message
Debug Logs
System Information
Screenshots
Steps to Reproduce
- Run a session so at least one session exists (e.g. cortex run "hello")
- Run cortex sessions and note the Date column for a session — it shows YYYY-MM-DD HH:MM (e.g. 2026-03-31 14:30)
- Run cortex export and note the date for the same session ID — it shows YYYY-MM-DD HH:MM:SS (e.g. 2026-03-31 14:30:45)
- Observe that the same session displays different timestamp precision in the two commands
Expected Behavior
Both cortex sessions and cortex export should use the same timestamp precision for session dates. Either both should show seconds ([..19]) or both should omit them ([..16]), so users can consistently identify sessions across commands.
Actual Behavior
cortex sessions shows 2026-03-31 14:30 (no seconds) while cortex export shows 2026-03-31 14:30:45 (with seconds) for the same session, making cross-referencing unnecessarily difficult.
Additional Context
No response
Project
cortex
Description
cortex sessions truncates session timestamps to 16 bytes (timestamp[..16]), producing YYYY-MM-DD HH:MM (no seconds). cortex export (session picker) truncates to 19 bytes (timestamp[..19]), producing YYYY-MM-DD HH:MM:SS (with seconds). The same session viewed through these two commands displays different date precision, confusing users who try to cross-reference sessions between them.
In src/cortex-cli/src/cli/handlers.rs line 806-807:
In src/cortex-cli/src/export_cmd.rs line 268-269:
Both operate on the same SessionInfo objects returned by list_sessions(), so the source timestamp is identical. The only difference is the hard-coded slice length: 16 vs 19.
Error Message
Debug Logs
System Information
Screenshots
Steps to Reproduce
Expected Behavior
Both cortex sessions and cortex export should use the same timestamp precision for session dates. Either both should show seconds ([..19]) or both should omit them ([..16]), so users can consistently identify sessions across commands.
Actual Behavior
cortex sessions shows 2026-03-31 14:30 (no seconds) while cortex export shows 2026-03-31 14:30:45 (with seconds) for the same session, making cross-referencing unnecessarily difficult.
Additional Context
No response