Skip to content

feat(mobile): add Codex task parity#3654

Open
richardsolomou wants to merge 8 commits into
posthog-code/finalize-mobile-portability-boundaryfrom
posthog-code/feat-mobile-codex-parity
Open

feat(mobile): add Codex task parity#3654
richardsolomou wants to merge 8 commits into
posthog-code/finalize-mobile-portability-boundaryfrom
posthog-code/feat-mobile-codex-parity

Conversation

@richardsolomou

@richardsolomou richardsolomou commented Jul 21, 2026

Copy link
Copy Markdown
Member

Problem

Mobile task creation hardcoded Claude, and its new-task and conversation screens had drifted from desktop. Runtime choices could also be lost or mapped to Claude-specific configuration when retrying or resuming Codex tasks.

Changes

I added Claude and Codex controls across task creation, retry, and resume using the shared model and reasoning policies. Adapter-specific execution modes, defaults, and cloud reasoning keys now come from core. Native rendering remains in mobile.

How did you test this?

  • Ran the full shared, API client, core, and mobile test suites.
  • Ran the monorepo typecheck.
  • Ran repo-wide Biome and the host-boundary check.
  • Tested real Claude and Codex task-detail screens, failed-run states, and PR actions in the iPhone simulator.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

React Doctor found 2 issues in 2 files · 2 warnings.

2 warnings

src/app/task/index.tsx

src/features/tasks/composer/TaskChatComposer.tsx

Reviewed by React Doctor for commit 29a77af.

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
packages/core/src/sessions/cloudTaskSessionService.ts:402
**Legacy Resume Drops Task Controls**

When both the legacy run and its persisted composer config lack an adapter, this remains `undefined`. The mobile API client then omits the resolved model, reasoning, and permission mode with the adapter, so retry can restart an older Claude task using server defaults instead of its previous controls.

```suggestion
    const adapter =
      composerConfig?.adapter ?? previousRun?.adapter ?? "claude";
```

### Issue 2 of 2
packages/core/src/sessions/cloudTaskSessionService.ts:425-428
**Invalid Run Reasoning Reused**

When the composer reasoning is unsupported and the adapter has not changed, this fallback reuses `previousRun.reasoningEffort` without validating it. If that stored value is also unsupported by the resolved model, the API client rejects the payload and sandbox-inactive retry fails instead of resuming.

Reviews (1): Last reviewed commit: "feat(mobile): add Codex task controls" | Re-trigger Greptile

const freshTask = await this.ports.api.getTask(taskId);
const previousRun = freshTask.latestRun;
const composerConfig = this.ports.preferences.getComposerConfig(taskId);
const adapter = composerConfig?.adapter ?? previousRun?.adapter;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Legacy Resume Drops Task Controls

When both the legacy run and its persisted composer config lack an adapter, this remains undefined. The mobile API client then omits the resolved model, reasoning, and permission mode with the adapter, so retry can restart an older Claude task using server defaults instead of its previous controls.

Suggested change
const adapter = composerConfig?.adapter ?? previousRun?.adapter;
const adapter =
composerConfig?.adapter ?? previousRun?.adapter ?? "claude";
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/core/src/sessions/cloudTaskSessionService.ts
Line: 402

Comment:
**Legacy Resume Drops Task Controls**

When both the legacy run and its persisted composer config lack an adapter, this remains `undefined`. The mobile API client then omits the resolved model, reasoning, and permission mode with the adapter, so retry can restart an older Claude task using server defaults instead of its previous controls.

```suggestion
    const adapter =
      composerConfig?.adapter ?? previousRun?.adapter ?? "claude";
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +425 to +428
? reasoningEffort
: adapterChanged
? undefined
: (previousRun?.reasoningEffort ?? undefined),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Invalid Run Reasoning Reused

When the composer reasoning is unsupported and the adapter has not changed, this fallback reuses previousRun.reasoningEffort without validating it. If that stored value is also unsupported by the resolved model, the API client rejects the payload and sandbox-inactive retry fails instead of resuming.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/core/src/sessions/cloudTaskSessionService.ts
Line: 425-428

Comment:
**Invalid Run Reasoning Reused**

When the composer reasoning is unsupported and the adapter has not changed, this fallback reuses `previousRun.reasoningEffort` without validating it. If that stored value is also unsupported by the resolved model, the API client rejects the payload and sandbox-inactive retry fails instead of resuming.

How can I resolve this? If you propose a fix, please make it concise.

@richardsolomou richardsolomou changed the title feat(mobile): add Codex task controls feat(mobile): add Codex and desktop-style task controls Jul 21, 2026
@richardsolomou richardsolomou changed the title feat(mobile): add Codex and desktop-style task controls feat(mobile): add Codex and desktop-style task UI Jul 21, 2026
@richardsolomou
richardsolomou force-pushed the posthog-code/finalize-mobile-portability-boundary branch from e917fbd to 0f867aa Compare July 23, 2026 13:19
@richardsolomou
richardsolomou force-pushed the posthog-code/feat-mobile-codex-parity branch from 44c9001 to 515fcec Compare July 23, 2026 13:24
@richardsolomou richardsolomou changed the title feat(mobile): add Codex and desktop-style task UI feat(mobile): add Codex task parity Jul 23, 2026
@richardsolomou
richardsolomou force-pushed the posthog-code/finalize-mobile-portability-boundary branch from 0f867aa to c01f356 Compare July 23, 2026 13:44
Generated-By: PostHog Code
Task-Id: 11daf8d3-7830-436a-ab8f-99123586070d
Generated-By: PostHog Code
Task-Id: 11daf8d3-7830-436a-ab8f-99123586070d
Generated-By: PostHog Code
Task-Id: 11daf8d3-7830-436a-ab8f-99123586070d
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
@richardsolomou
richardsolomou force-pushed the posthog-code/feat-mobile-codex-parity branch from 515fcec to 132174b Compare July 23, 2026 13:46
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
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.

1 participant