feat(codex): surface active goals in thread status #8615
Closedmerged-clem(GitHub profile, opens in a new tab)wants to merge 3 commits into
main fromrefs/pull/8615/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- @@ -2256,3 +2257,9 @@22562257 } satisfies ProviderSession;22572258 yield* Ref.set(sessionRef, session);22582259 yield* emitSessionEvent("session/ready", "Codex App Server session ready.");2260+ // Goals are durable Codex thread state, unlike a live turn. Hydrate the2261+ // shell after reconnect so a settled thread does not lose its truthful2262+ // Goal active indication until the next goal notification arrives.2263+ const goalResponse = yield* client2264+ .request("thread/goal/get", { threadId: providerThreadId })2265+ .pipe(Effect.option);@@ -2256,3 +2257,7 @@22562257 } satisfies ProviderSession;22572258 yield* Ref.set(sessionRef, session);22582259 yield* emitSessionEvent("session/ready", "Codex App Server session ready.");2260+ // Goals are durable Codex thread state, unlike a live turn. Hydrate the2261+ // shell after reconnect so a settled thread does not lose its truthful2262+ // Goal active indication until the next goal notification arrives.2263+ const goalResponse = yield* client
- @@ -4727,5 +4728,7 @@47274728 ? liveCount > 047284729 ? `${liveCount} ${liveCount === 1 ? "agent" : "agents"} working`47294730 : "Background work"4730- : "Monitoring",4731+ : goal4732+ ? "Goal active"4733+ : "Monitoring",47314734 actions: (@@ -877,3 +881,4 @@877881 icon: null,878882 className: "text-sky-600 dark:text-sky-400",879883 }884+ : status === "goal"
- @@ -1923,3 +1923,18 @@19231923 }19241924 }192519251926+ if (event.type === "thread.goal.updated") {1927+ threadBackgroundLiveness.recordGoalLiveness({1928+ threadId: thread.id,1929+ goalId: "provider-goal",1930+ status: event.payload.status,1931+ });1932+ }1933+1934+ if (event.type === "thread.goal.cleared") {1935+ threadBackgroundLiveness.recordGoalLiveness({1936+ threadId: thread.id,1937+ goalId: "provider-goal",1938+ status: "complete",1939+ });1940+ }@@ -4727,4 +4728,6 @@47274728 ? liveCount > 047284729 ? `${liveCount} ${liveCount === 1 ? "agent" : "agents"} working`47294730 : "Background work"4730- : "Monitoring",4731+ : goal4732+ ? "Goal active"4733+ : "Monitoring",@@ -111,0 +129,21 @@129+ label: "Monitoring",130+ pillClassName: "bg-adaptive-sky-500-a12-a16",131+ textClassName: "text-adaptive-sky-700-300",132+ iconColor: "#0a84ff",133+ iconBackground: "rgba(10,132,255,0.22)",134+ pulse: false,135+ };136+ }137+138+ if (thread.backgroundLiveness === "goal") {139+ return {140+ kind: "goal",141+ label: "Goal active",142+ pillClassName: "bg-adaptive-sky-500-a12-a16",143+ textClassName: "text-adaptive-sky-700-300",144+ iconColor: "#0a84ff",145+ iconBackground: "rgba(10,132,255,0.22)",146+ pulse: false,147+ };148+ }149+
- @@ -1923,3 +1923,9 @@19231923 }19241924 }192519251926+ if (event.type === "thread.goal.updated") {1927+ threadBackgroundLiveness.recordGoalLiveness({1928+ threadId: thread.id,1929+ goalId: "provider-goal",1930+ status: event.payload.status,1931+ });@@ -4713,3 +4713,4 @@47134713 return null;47144714 }47154715 const working = activeBackgroundLiveness === "working";4716+ const goal = activeBackgroundLiveness === "goal";
merged-clem(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
ee86716d-660d-4d4c-b022-2edd97f3dc4bYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Comment `@coderabbitai help` to get the list of available commands.