Skip to content

feat(runtime): add bounded foreground ad hoc child route - #4701

Open
testikun wants to merge 6 commits into
apache:mainfrom
testikun:codex/issue-4538-testikun
Open

feat(runtime): add bounded foreground ad hoc child route#4701
testikun wants to merge 6 commits into
apache:mainfrom
testikun:codex/issue-4538-testikun

Conversation

@testikun

@testikun testikun commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the bounded foreground ad hoc child-agent slice for #4538:

  • adds a desktop setting for an explicitly enabled temporary child-agent policy, including the maximum profile and model connection/model/thinking-level selection;
  • exposes the synthetic temporary-bounded route through the existing agent_list/agent_spawn catalog path only when enabled and its host-resolved model connection is available;
  • preserves an existing ad hoc policy when ordinary presets are updated;
  • accepts only bounded task-scoped role text, while Runtime/Host continue to select the profile, model, tools, permission, workspace, lifecycle, and nesting authority;
  • rejects model-supplied overreach (model, connection, tools, permission, workspace, lifecycle/nesting, write-back/isolation, and a second profile selector);
  • rejects invalid role data, nested creation, graph/background use, unavailable routes, and over-broad contract requests before child Session creation;
  • rejects child creation from Side Conversations as well as linked child Sessions;
  • preflights the temporary child against the parent Session execution boundary;
  • preserves the existing linked Session/RuntimeInvocation lineage, idempotency, cancellation, recovery, transcript isolation, and artifact paths;
  • extracts shared synthetic-preset construction and adds focused coverage.

Current-head real App verification (2026-09-04)

Built and launched pre-rebase feature tree 58979f3 in a visible local Electron window; current head 7b81677 is the rebased equivalent on apache/main 19ac204ab, opened Settings → Subagents, enabled the temporary-subagent policy, saved it, and verified the persisted Host setting. These are direct screenshots from the running Maka App; they are not mockups or generated images.

1. Current-head disabled state with the new route controls

Temporary subagent policy disabled

2. Current-head enabled state after saving the policy

Temporary subagent policy enabled and saved

Verification

  • rebased the current PR branch onto current apache/main (19ac204ab)
  • full workspace and Desktop production build — passed
  • Desktop typecheck — passed
  • renderer architecture checker — passed (71/71)
  • child-session Runtime test group — passed (16/16)
  • real Electron persistence journey: disabled → enable → save → persisted Host setting — passed
  • Biome check on all 19 changed TypeScript, TSX, and CSS files — passed
  • git diff --check — passed
  • legacy screenshot binaries removed from the source diff; evidence remains in this first PR description

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex provided material implementation and review assistance, fixed the architecture-budget and RuntimeInvocation convergence regressions, added a real Electron persistence test, ran visible App verification, and prepared the commits.

Closes #4538

@github-actions github-actions Bot added the effort/XL Under 2500 readable lines label Sep 4, 2026
@testikun
testikun force-pushed the codex/issue-4538-testikun branch from 567f777 to 158390d Compare September 4, 2026 02:06
testikun pushed a commit to testikun/maka that referenced this pull request Sep 4, 2026
@testikun
testikun force-pushed the codex/issue-4538-testikun branch from 158390d to 8f12a84 Compare September 4, 2026 07:09
@testikun
testikun force-pushed the codex/issue-4538-testikun branch from 8f12a84 to 58979f3 Compare September 4, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Under 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proposal(runtime): let the root Agent create a bounded task-specific Sub Agent

1 participant