Skip to content

fix: harden agent, desktop, and mobile reliability - #637

Merged
tallcode merged 1 commit into
mainfrom
codex/agent-desktop-mobile-audit-fixes
Sep 15, 2026
Merged

tallcode merged 1 commit into
mainfrom
codex/agent-desktop-mobile-audit-fixes

Conversation

@tallcode

Copy link
Copy Markdown
Collaborator

Summary

  • fail closed to manual approval when sandbox settings cannot be read, and surface Agent session storage failures instead of treating them as missing sessions
  • keep queued prompts independent, remove the nested model-cycle read lock, and acknowledge remote prompts only after Agent acceptance plus a durable Desktop receipt
  • stop active Agent sessions before deletion, retain failed filesystem cleanup for retry, and preserve complete history through chunked remote reads
  • propagate Mobile pending-operation storage failures, revalidate attachment cache identities, and align DEV_MD with the implemented configuration and authentication ownership

Validation

  • cargo fmt -p future-agent --check
  • cargo clippy -p future-agent --all-targets -- -D warnings
  • cargo test -p future-agent --lib -- --test-threads=1 (1767 passed, 1 ignored)
  • cargo fmt --check --manifest-path desktop/src-tauri/Cargo.toml
  • cargo clippy --manifest-path desktop/src-tauri/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml --no-default-features --lib -- --test-threads=1 (976 passed)
  • Desktop active-session deletion regression test
  • Mobile TypeScript typecheck and ESLint
  • Mobile focused Jest suites (72 passed)
  • git diff --check

@tallcode
tallcode enabled auto-merge (squash) September 15, 2026 02:56
@tallcode
tallcode merged commit a026007 into main Sep 15, 2026
12 checks passed
@tallcode
tallcode deleted the codex/agent-desktop-mobile-audit-fixes branch September 15, 2026 03:04
huichen added a commit that referenced this pull request Sep 26, 2026
Restores the follow-up coalescing removed in #637, this time behind an
opt-in `enqueue_coalescing` busy policy so only callers that can absorb a
folded run opt in.

Agent:
- `BusyPolicy::EnqueueCoalescing` queues like `enqueue_if_busy` but lets
  the run boundary fold a consecutive run of such requests into one.
- `InMemoryRunQueue::drain_coalescing_after_first` takes that prefix
  atomically: the front must itself have opted in, folding stops at the
  first request that did not (order and identity preserved) and at the
  merged-payload byte cap; folded requests leave the queue, release their
  quota and are recorded terminal with reason `merged`.
- `start_next_scheduled` merges text, model-context sidecar, images and
  attachments in queue order (nothing dropped, nothing reordered), keeps
  the front request's run identity, and takes the EXECUTION configuration
  (model, thinking, cwd, permissions, sandbox) from the LAST folded
  request, so #637's "front config silently reused for later requests"
  cannot happen. The accepted message carries `coalesced_run_ids`.

TUI: submits with the coalescing policy, and renders a folded submission
as `merged into the previous run` (`RunState::Merged`) instead of leaving
it at `queued (#n)`.

Loop: the supervisor outbox delivers batches with the coalescing policy —
batches are fire-and-forget state syncs, so the ones that queue behind a
busy orchestrator fold into one reconciliation run instead of each
starting and being superseded on its own.

CLI `--follow-up`, the IM bridges and Desktop/Mobile keep plain
`enqueue_if_busy`: they stream their own run and would stall on a merged
ack they never receive.
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