Skip to content

feat(mobile): add Codex task parity - #3654

Merged
trunk-io[bot] merged 44 commits into
mainfrom
posthog-code/feat-mobile-codex-parity
Jul 29, 2026
Merged

feat(mobile): add Codex task parity#3654
trunk-io[bot] merged 44 commits into
mainfrom
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 retry/resume flows could lose or combine runtime choices from different adapters.

Depends on #3642
Refs PostHog/posthog#76229

Changes

Phase 3 product change: I added Claude and Codex controls across task creation, retry, and resume. Core owns adapter transitions and resume-option resolution, including legacy mobile state that predates persisted adapter selection.

How did you test this?

  • Full monorepo typecheck
  • 2,614 core tests
  • 453 mobile tests
  • Host-boundary check

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 c58a11d.

@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

Comment thread packages/core/src/sessions/cloudTaskSessionService.ts Outdated
Comment thread packages/core/src/sessions/cloudTaskSessionService.ts Outdated
@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
@richardsolomou
richardsolomou force-pushed the posthog-code/feat-mobile-codex-parity branch from 515fcec to 132174b Compare July 23, 2026 13:46
@richardsolomou
richardsolomou force-pushed the posthog-code/finalize-mobile-portability-boundary branch from e809724 to ff81e50 Compare July 23, 2026 16:34
@richardsolomou
richardsolomou force-pushed the posthog-code/feat-mobile-codex-parity branch from 29a77af to 01d941c Compare July 23, 2026 16:34
@richardsolomou
richardsolomou force-pushed the posthog-code/finalize-mobile-portability-boundary branch from ff81e50 to c630011 Compare July 23, 2026 17:28
@richardsolomou
richardsolomou force-pushed the posthog-code/feat-mobile-codex-parity branch 2 times, most recently from d4a99d1 to 5e2a064 Compare July 23, 2026 18:55
@richardsolomou
richardsolomou force-pushed the posthog-code/finalize-mobile-portability-boundary branch 2 times, most recently from 498fc78 to 752e25e Compare July 24, 2026 16:42
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
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
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
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
Keep the workspace on React 19.2 while aligning mobile with the latest supported native runtime.

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
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
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
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
@richardsolomou
richardsolomou force-pushed the posthog-code/feat-mobile-codex-parity branch from f8e62fb to 9d4a2e4 Compare July 29, 2026 07:58
@richardsolomou
richardsolomou force-pushed the posthog-code/finalize-mobile-portability-boundary branch from 3993253 to 9284b42 Compare July 29, 2026 07:58
Base automatically changed from posthog-code/finalize-mobile-portability-boundary to main July 29, 2026 13:08
@trunk-io

trunk-io Bot commented Jul 29, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
composerConfig?.mode ?? DEFAULT_CLAUDE_EXECUTION_MODE;
const composerModel = composerConfig?.model ?? DEFAULT_GATEWAY_MODEL;
(composerConfigMatchesAdapter ? composerConfig?.mode : undefined) ??
getDefaultExecutionModeForAdapter(composerAdapter);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Low: Resume discards the previous permission mode

For an existing Codex task without a saved mobile composer selection, this falls back to auto instead of the latest run's initial_permission_mode. Both resume and retry subsequently send this value explicitly, so repository-controlled instructions can edit the workspace after the user retries a task that was originally Plan or Read only. Preserve and validate the previous run's mode when the adapter matches, falling back to the adapter default only when no valid prior mode exists.

@veria-ai

veria-ai Bot commented Jul 29, 2026

Copy link
Copy Markdown

PR overview

This pull request adds Codex task parity to the mobile app, including support for resuming and retrying existing tasks with composer permission settings.

One issue remains open in the resume and retry flow: tasks previously run in Plan or Read-only mode can fall back to Auto mode when no mobile selection is saved. This could allow repository-provided instructions to modify the workspace after a user retries the task, though exploitation requires that specific task state and user action. No issues have yet been addressed.

Open issues (1)

Fixed/addressed: 0 · PR risk: 4/10

@trunk-io
trunk-io Bot merged commit b2efe63 into main Jul 29, 2026
34 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/feat-mobile-codex-parity branch July 29, 2026 13:30
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