Skip to content

feat(router): harden routing, Claude print turns, and native image passthrough - #57

Merged
gui-drumond merged 3 commits into
mainfrom
codex/deepseek-harness-hardening
Aug 15, 2026
Merged

feat(router): harden routing, Claude print turns, and native image passthrough#57
gui-drumond merged 3 commits into
mainfrom
codex/deepseek-harness-hardening

Conversation

@gui-drumond

@gui-drumond gui-drumond commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Hardens the LoomRouter proxy around the failure modes found in real routed sessions: Claude Code print turns were being denied tool access, Codex native image generation was falling through to a 404, and the Codex config patch was not preserving foreign settings written by the desktop app.

Why

  • Claude Code runs through claude -p, which has no interactive approval channel. Without an explicit permission mode and trusted project entry, the model reports that it cannot write files or run commands.
  • The proxy only registered Responses, models, and chat routes. Codex image generation and edit calls therefore hit the fallback and returned 404 before reaching the native backend.
  • Codex Desktop can rewrite ~/.codex/config.toml and reorder or drop managed markers. The existing patch needed stronger ownership and rollback handling.

Changes

  • Claude Code print turns now pass an explicit permission mode, defaulting to acceptEdits, with LOOM_CLAUDE_PERMISSION_MODE as an override.
  • ~/.claude.json gets the selected workspace marked as trusted before non-interactive turns.
  • Claude child processes recover the login shell PATH, so bun, cargo, and other project tools are visible when the app was launched from Finder.
  • Codex status now reports config parseability and local auth session presence/expiry without exposing the token.
  • Codex config patching hoists foreign tables out of the managed block and persists previous root values for safer rollback.
  • Tool translation now normalizes union-root schemas and whole-number JSON arguments that strict providers otherwise reject.
  • Native Codex image generation/edit routes are forwarded to the ChatGPT image backend.
  • Added regression coverage for Claude Code subagent args through the LoomRouter subagent path.

Validation

  • cargo fmt --manifest-path src-tauri/Cargo.toml --check
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path src-tauri/Cargo.toml
  • bun run lint
  • bun run test
  • bun run build

Non-goals

  • Does not adopt a new UI or session log surface.
  • Does not add raw image generation through third-party providers.
  • Does not replace the existing routing architecture.

@gui-drumond
gui-drumond force-pushed the codex/deepseek-harness-hardening branch from 8fa4fca to a76b700 Compare August 15, 2026 04:20
@gui-drumond gui-drumond changed the title feat(router): harden provider routing and subprocess handling feat(router): harden routing, Claude print turns, and native image passthrough Aug 15, 2026
…s-hardening

# Conflicts:
#	src-tauri/src/claude_cli.rs
#	src-tauri/src/cli_locator.rs
@gui-drumond
gui-drumond merged commit 60c8593 into main Aug 15, 2026
2 checks passed
@gui-drumond
gui-drumond deleted the codex/deepseek-harness-hardening branch August 15, 2026 04:39
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