Skip to content

fix(cloud-agent): propagate taskRunId through codex loadSession#1720

Merged
tatoalo merged 1 commit into
mainfrom
fix/codex-loadsession-task-run
Apr 20, 2026
Merged

fix(cloud-agent): propagate taskRunId through codex loadSession#1720
tatoalo merged 1 commit into
mainfrom
fix/codex-loadsession-task-run

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented Apr 17, 2026

Problem

newSession and unstable_resumeSession both carry _meta.taskRunId / taskId into sessionState and emit _posthog/sdk_session on cloud runs. loadSession dropped them on the floor. Re-attaching a desktop client to an existing cloud codex session therefore silenced TURN_COMPLETE and USAGE_UPDATE on subsequent prompts (both gated on sessionState.taskRunId), and the adapter→session mapping was never published.

Changes

In CodexAcpAgent.loadSession, propagate taskRunId / taskId into sessionState and fire _posthog/sdk_session when taskRunId is present, matching the other session-creation paths.

How did you test this?

  • Two new unit tests: taskRunId is propagated and SDK_SESSION fires when present; no extNotification is emitted when taskRunId is absent.
  • Full @posthog/agent suite green.

Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 17, 2026

@tatoalo tatoalo force-pushed the fix/codex-prcontext-injection branch 2 times, most recently from a52e1a8 to 37aaa82 Compare April 20, 2026 09:25
@tatoalo tatoalo force-pushed the fix/codex-loadsession-task-run branch from bfbea4d to f00c114 Compare April 20, 2026 09:25
@tatoalo tatoalo changed the base branch from fix/codex-prcontext-injection to graphite-base/1720 April 20, 2026 09:35
@tatoalo tatoalo force-pushed the fix/codex-loadsession-task-run branch from f00c114 to 65f3732 Compare April 20, 2026 09:35
@tatoalo tatoalo force-pushed the graphite-base/1720 branch from 37aaa82 to 9f31016 Compare April 20, 2026 09:35
@graphite-app graphite-app Bot changed the base branch from graphite-base/1720 to main April 20, 2026 09:36
@tatoalo tatoalo force-pushed the fix/codex-loadsession-task-run branch from 65f3732 to 4fee8b5 Compare April 20, 2026 09:36
@tatoalo tatoalo merged commit 99ebc97 into main Apr 20, 2026
16 checks passed
Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 20, 2026

Merge activity

@tatoalo tatoalo deleted the fix/codex-loadsession-task-run branch April 20, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants