Skip to content

[Feature]: Support idempotent distros #1000

Open

Description

@inean

Problem or use case

Right now, I can use flatpack helper apps to install AppImage release into Fedora Atomic like (idempotent distros).
Ideally, we will use a toolbox to set there codex agents, github cli, etc.

Proposed solution

Add support to orca to develop on that toolbox sandboxed environment

  • If not toolbox exists, create one
  • set a default toolbox to use as sandbox environment

Aditionally, we can also add suport to distrobox

Alternatives or additional context

No response

Activity

  1. added
    enhancement
    on Apr 23, 2026
  2. self-assigned this
    on May 14, 2026
  3. nwparker commented on May 30, 2026

    @nwparker
    Contributor

    Triage from current origin/main (644214a8d47a2cc28f9d049c1e4e6d2debefd03a) suggests this is a product/architecture slice, not a bounded implementation issue yet. The request asks for Fedora Atomic/AppImage users to run Orca agents, gh, and related tools inside a toolbox, optionally auto-create/select a default toolbox, and also support distrobox; that crosses packaging, terminal spawn, agent/tool detection, repo operations, runtime APIs, settings, path mapping, and remote behavior.

    Evidence from the current architecture:

    • Linux packaging is host-process oriented today: config/electron-builder.config.cjs:193-231 ships AppImage/deb/rpm and bundled Linux resources, while src/main/startup/configure-process.ts:51-105 and src/main/startup/hydrate-shell-path.ts:159-195 patch/hydrate the packaged Electron process PATH from the host shell.
    • Local terminal execution has no generic sandbox selector: src/main/providers/types.ts:21-53 exposes PtySpawnOptions with cwd/env/command plus Windows WSL fields, and src/main/providers/local-pty-provider.ts:188-320 chooses a host POSIX shell or Windows WSL path before spawning via node-pty.
    • Host filesystem assumptions are built into PTY startup: src/main/providers/local-pty-utils.ts:82-91 validates the cwd with host fs, and src/main/providers/local-pty-utils.ts:119-185 falls back only among host shells (/bin/zsh, /bin/bash, /bin/sh).
    • The terminal/runtime APIs do not carry a sandbox identity: src/main/ipc/pty.ts:1493-1798, src/main/runtime/orca-runtime.ts:584-594, and src/main/runtime/rpc/methods/terminal.ts:554-567 thread command/env/worktree/connection IDs, but not toolbox/distrobox/container metadata.
    • Local agent/tool discovery is only host or Windows WSL today: src/main/ipc/preflight.ts:15-119 models PreflightRuntimeContext as WSL fields, src/renderer/src/lib/local-preflight-context.ts:4-76 builds only host/WSL keys, and src/renderer/src/store/slices/detected-agents.ts:27-132 keeps local detection separate from SSH connection-scoped detection.
    • Settings/persistence already distinguish host vs WSL for Windows (src/shared/types.ts:1749-1763, src/renderer/src/components/settings/TerminalPane.tsx:140-208, src/renderer/src/components/settings/AgentLocationSetting.tsx:1-124), but there is no Linux container/sandbox setting.
    • Runtime environments are paired remote runtime servers, not local sandboxes: src/shared/runtime-environments.ts:22-84, src/main/ipc/runtime-environments.ts:45-100, and src/renderer/src/components/settings/RuntimeEnvironmentsPane.tsx:50-190 are pairing-code/WebSocket oriented.
    • SSH/mobile remain a separate axis: src/main/ipc/preflight.ts:186-315 delegates remote detection over SSH, src/main/runtime/orca-runtime.ts:7049-7064 switches agent detection/launch platform on repo.connectionId, and src/main/ipc/pty.ts:1528-1567 intentionally avoids local host injection for SSH because local filesystem/loopback assumptions are wrong remotely.
    • I found no existing toolbox/distrobox provider on origin/main; git grep -i -E "distrobox|toolbox|toolbx" origin/main -- src config resources package.json only finds unrelated UI/macOS HIToolbox references, and the only container-aware runtime-ish code I found is port classification in src/main/ports/local-workspace-port-scanner.ts:372-438.

    Product decisions needed before implementation:

    1. Scope: is the selected toolbox/distrobox only for new terminals and agent launches, or must it also own git/status/diff, setup hooks, file search/open, worktree creation/deletion, browser port attribution, and CLI/runtime APIs?
    2. Path contract: does Orca require a host-visible worktree bind-mounted at the same path inside the container, or do we support container-only paths with bidirectional path translation?
    3. Lifecycle: should Orca only attach to an existing toolbox/distrobox, or create/manage one? If creating, what image, name, package bootstrap, and cleanup policy are expected?
    4. Tool discovery: should agent/gh/git detection prefer host, selected sandbox, or both? How should AppImage host PATH hydration interact with sandbox PATH discovery?
    5. Settings and gating: this should be Linux-only at first, with Windows WSL remaining a separate concept and macOS hidden/unsupported unless a later container provider is designed.
    6. Remote behavior: SSH, paired runtime environments, and mobile clients should not be conflated with local Linux sandboxes; we need an explicit rule for whether a selected local sandbox applies only to local desktop workspaces.

    Suggested first safe PRs after those decisions:

    1. Add Linux-only, read-only discovery/diagnostics for toolbox and distrobox availability plus candidate container names in Settings, with no terminal or agent behavior change.
    2. Add a persisted Linux sandbox selection schema/UI behind a Linux gate, attach-only at first, with no auto-create and no default behavior change.
    3. Route only manually launched local terminals and local agent preflight through the selected sandbox wrapper, requiring same-path host-visible cwd and documenting that git/filesystem/setup hooks remain host-owned in that slice.
    4. Follow with repo operation/path-mapping support, setup-hook execution, runtime/CLI API fields, port attribution, and any auto-create/bootstrap behavior as separate PRs.

    Given the current shape, I would not start with a small code change inside the existing PTY provider. The first implementation PR needs at least the scope/path/lifecycle decisions above, otherwise it risks creating a partial sandbox mode that launches an agent in one environment while Orca still reads git/filesystem/runtime state from another.

  4. added
    size/m
    on Jun 10, 2026
  5. added theissue type on Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

collecting upvoteenhancementsize/m

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions