← Back to Pull requests

feat(cli): simplify Session controls and persist model selection #6170

Closed
unknown closed this pull request without merging on Oct 21, 2026 06:02 UTC
View on GitHub
unknown unknown commented on Oct 19, 2026 10:44 UTC
Author

Summary

External callers can now persistently change an existing Session's model with maka run --session <id> --model <id>. Settings alone only save configuration; adding --resume uses the existing Host safe-continuation operation, while adding a prompt submits new user input. --connection and --thinking use the same configuration operation. CLI does not classify the failure, select a replacement, or implicitly stop/resume execution. Host errors are returned directly.

The interface also accepts identical repeated options and --status --recap (JSON with state, boundary, and progress), reports usage errors in two lines, and groups help by workflow. Ordinary runs still wait by default; parent-agent examples recommend --no-wait without redundant --json/--queue. Status remains compact; settings-only calls add a configuration receipt. The maka-cli skill now keeps the common workflow in its entrypoint and links conditional control details, with updated English/Chinese CLI documentation.

Refs #6168. Depends on #6169; this PR is based on feat/cli-session-recap so its diff contains only the follow-up. GitHub native stack #6172 tracks #6169 → #6170 → #6171.

Verification

  • Review follow-up e6036a1b2c: fixed catalog-managed executor model updates by omitting implicit native thinking; preserved saved thinking when selecting the same native target. Production Host/plugin persistence and native Runtime integration tests passed, including an existing high setting before an actual model change. Both inline review threads are addressed.
  • Initial revision: 118 affected tests passed, including CLI parsing/output, Host Session controls, native Runtime streaming/recap, Session updates, and durable recap effects.

  • The cross-process test uses real Host/Runtime execution and a local deterministic model endpoint. It verifies active-session rejection, persistent model/account changes across CLI calls, configuration-only calls dispatching no model work, explicit resume on the new model, new input on the selected model, combined status/recap JSON, and observer cancellation.

  • npm run lint, npm run format:check, npm run build, npm run typecheck, both contribution-guide knip checks, ASF headers, Windows skip inventory, skill validation, and git diff --check passed.

  • Real-provider acceptance passed with an isolated profile: cross-process AskUser/answer, active status+recap, minimal sandbox approval and denial (file effects verified), queued follow-up, Host rejection of a different model while active, and an actual insufficient-credits failure followed by persistent model replacement and explicit resume in the same Session. Parent independently assessed the worker review.

  • Full repository tests were not run locally. CI was dispatched on this branch because PR-triggered CI currently targets only main.
  • Configuration-only fixture receipt includes:

    {"configuration":{"connection":"fake","model":"other-model","thinking":null}}
    

    status still describes the existing Turn; a successful settings update does not mean that Turn completed. Settings commit before an explicit follow-up action and remain saved if that action fails.

    AI use

  • No generative tool made a substantive contribution

  • Generative tooling made a substantive contribution
  • Tool(s) and scope: Codex implemented and reviewed the CLI, skill, documentation, and tests at the contributor's request. This does not replace independent human review. The commit includes Generated-by: Codex.

    Checklist

  • Tests cover the change and fail without it

  • Lint, format, typecheck and the affected suites pass locally
  • Does this PR entail a change in behavior?

  • Yes — described under Summary above

  • No
  • Diff: 471 lines (+353 / -118) across 5 files Reviewer: me2seeks Review duration: 2598m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.46) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.46 · 471 lines diff across 5 files
    0.46
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.368
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6170"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.7% (MEDIUM) · Higher = larger blast radius
    45.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.1% · Safe to merge
    18.1%
    Repository