Skip to content

fix(codex): expose HAPI threads to Codex Desktop#1022

Open
swear01 wants to merge 3 commits into
tiann:mainfrom
swear01:fix/issue-1019-codex-desktop-discovery
Open

fix(codex): expose HAPI threads to Codex Desktop#1022
swear01 wants to merge 3 commits into
tiann:mainfrom
swear01:fix/issue-1019-codex-desktop-discovery

Conversation

@swear01

@swear01 swear01 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #1019

Summary

  • classify every new top-level HAPI Codex thread as threadSource: "user"
  • cover both normal first-turn creation and goal-first thread creation
  • keep resume requests unchanged
  • add launcher-level regression coverage for the exact thread/start payload

Root cause

HAPI persisted valid Codex threads with the correct cwd and Git metadata, but omitted Codex app-server's supported threadSource field. Those threads were consequently stored with threadSource=null instead of the native top-level user classification expected for user-visible conversations.

Verification

  • TDD red: regression test failed with expected undefined to be "user"
  • bun run typecheck:cli
  • focused codexRemoteLauncher suite: 54/54 passed
  • full workspace typecheck
  • hub tests: 459 passed
  • web tests: 1162 passed
  • shared tests: 105 passed
  • Codex CLI 0.144.1 app-server probe accepted the field and returned threadSource: "user", correct cwd, and source: "vscode"

The full CLI run passed 1129 tests. Four unrelated runner integration assertions failed locally in the existing parallel spawn/stop stress flow; the changed Codex suite and all non-runner packages passed.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings
No findings.

Summary
Review mode: initial
No issues found in the added/modified lines. Residual risk: I did not run the test suite in this review context; the normal first-turn payload is covered, while the goal-first path is exercised but does not add a dedicated threadSource assertion.

Testing
Not run (automation/security review context).

HAPI Bot

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings
No findings.

Summary
Review mode: follow-up after new commits
No issues found in the added/modified lines. Residual risk: I did not run tests in this review context; I reviewed the current full diff plus the prior bot review and compare diff. The PR adds focused launcher assertions for normal first-turn creation, goal-first creation, and resume staying unchanged.

Testing
Not run (automation/security review context).

HAPI Bot

swear01 added a commit to swear01/hapi that referenced this pull request Jul 13, 2026
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.

bug(codex): HAPI-created threads/worktrees are missing from Codex Desktop projects

1 participant