{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreigersvbtmpwaux3j2dqnhzr5wqblqjx7t65wsg2ten76h7ysttbnu",
"uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mnpnx4e7yrq2"
},
"path": "/t/codex-profile-longest-task-does-not-update-for-completed-goal-runs/1382966#post_1",
"publishedAt": "2026-06-07T16:43:33.000Z",
"site": "https://community.openai.com",
"tags": [
"github.com/openai/codex",
"Profile \"Longest task\" does not update for completed long-running /goal tasks",
"yourprism"
],
"textContent": "I filed a Codex profile stats bug where the Profile “Longest task” value does not update for completed long-running `/goal` tasks:\n\ngithub.com/openai/codex\n\n#### Profile \"Longest task\" does not update for completed long-running /goal tasks\n\nopened 03:44PM - 07 Jun 26 UTC\n\n\n\n yourprism\n \n\nbug app session\n\n## Bug Codex Profile \"Longest task\" is not updating for completed long-running …slash goals. This appears related to goal/profile persistence, but the key detail is that this is not only old experimental-goal history: an 8h+ `/goal` was run after the Profile / \"Longest task\" feature was already visible in the Codex app, completed successfully, and still did not update the profile stat. ## Environment - Codex CLI: `codex-cli 0.130.0` - Platform: macOS - Local `~/.codex/version.json` latest_version: `0.130.0` ## Details - Current Profile \"Longest task\" remains stuck at 3h 48m. - I ran an 8h+ Codex task after the Profile / \"Longest task\" feature was already visible in the app. - That task was an actual slash goal (`/goal`) and completed successfully. - The profile stat still did not update. - I originally remembered an older long task as roughly 41h, but local evidence shows the PRISM `/goal` session actually spanned about 53.63h and did not save/show in profile stats. ## Local Evidence Local Codex CLI session history exists for a task longer than my original ~41h estimate: - `~/.codex/sessions/2026/05/04/rollout-2026-05-04T17-27-21-019df51a-6664-7600-b1bb-c46a6f9f54c3.jsonl` - Timestamp span: about 53.63h - Appears to be a PRISM `/goal` task But: - `~/.codex/goals_1.sqlite` exists - `thread_goals` currently has 0 rows - `goals_1.sqlite` migration: - `1 | thread goals | 2026-05-22 18:16:08 | success=1` - `state_5.sqlite` goal migrations: - `29 | thread goals | 2026-05-01 00:36:17 | success=1` - `33 | thread goal stopped statuses | 2026-05-22 18:16:08 | success=1` - `34 | drop thread goals | 2026-05-22 18:16:08 | success=1` So the raw session history exists, but the structured goal/profile tracker did not persist the long-running goal records. ## Related Issue Possibly related to #25407, but this report is specifically about Profile \"Longest task\" not updating for a post-Profile, real completed `/goal`, plus local evidence that the goal DB has no persisted rows. ## Expected The Profile \"Longest task\" stat should update to the longest completed `/goal` task. ## Actual The stat remains stuck at 3h 48m despite completed 8h+ and much longer goal sessions. ## Evidence Available I can provide screenshots of: - Profile showing \"Longest task\" stuck at 3h 48m - Completed 8h+ `/goal` - Longer CLI/session evidence I am not pasting raw JSONL contents publicly because session logs may contain sensitive material, but I can provide them privately through a secure support channel if needed.\n\nThe short version:\n\n * My Profile stat remains stuck at 3h 48m.\n * I ran a completed 8h+ `/goal` after the Profile / “Longest task” feature was already visible.\n * Local CLI history also shows a PRISM `/goal` session spanning about 53.63h.\n * The local `goals_1.sqlite` `thread_goals` table exists, but `count(*)` is 0.\n\n\n\nI found the related goal-storage threads too, especially `openai/codex#23984` and `openai/codex#25407`. The fixes/workarounds people reported there were:\n\n * fully restart Codex and any stale `codex app-server` processes so app-server and CLI versions match;\n * make sure the `goals` feature flag is not explicitly disabled;\n * if `thread/goal/get` failures persist, back up and rebuild the local Codex state DB files as OpenAI staff suggested.\n\n\n\nThat helps explain broken `/goal` reads/writes, but this case seems like a separate downstream persistence/backfill issue: the raw long-running session history exists, but the completed goal did not make it into the Profile “Longest task” stat.\n\nHas anyone else seen Profile stats stay stuck after a successful long-running `/goal`, especially after restarting/updating Codex?",
"title": "Codex Profile Longest task does not update for completed /goal runs"
}