Repository navigation
fix(agent): restore native CLI workspace and conversation behavior - #6816
Conversation
Generated-by: OpenAI Codex
There was a problem hiding this comment.
Update on 12 November: the two diagnosed source defects have been corrected in later rust-preview commits. I read both one-line diffs and verified that the fixes are present at 8faeefd79bd24fd12d0a45a4cefeef80d58ade28.
- #6821, landed as
08bcd01a03e48cd56764790002c26efd11094402, removescfg(unix)from theinvalidhelper. I read the original Windows job log at that exact landing: the productionmaka-clibuild completes; its later workspace test compilation fails on the separately diagnosed missinglive_workspacefield. The E0425 source defect is corrected. - #6825, landed as
8faeefd79bd24fd12d0a45a4cefeef80d58ade28, supplieslive_workspace: falsein the affected staged-task fixture. This corrects the missing initializer. I also read the successful Linux workspace build log at merge previewad54aeb5b5861e741c55ed6122be11a2895825dd:cargo nextest list --locked --workspace -E all()compiles the test targets, and the subsequent archives includemaka-agent-engine. Both corrected files have identical Git blobs in this compiled preview and in8faeefd79bd24fd12d0a45a4cefeef80d58ade28. This is compilation evidence, not successful execution of the archived tests. The author's nine passing reconcile tests are the author's results; I have not rerun them. The CI run for this landing has not completed at this update, so I am not claiming a successful current workspace test build or complete platform acceptance.
Further compilation evidence: the original Windows log for #6825 builds the workspace test targets at preview b2ec67b7fd4a135f00bd87519c0d75abd3b45457, then reaches native and Desktop test execution. I verified that this preview's entire Git tree equals landing 8faeefd79bd24fd12d0a45a4cefeef80d58ade28. The Linux workspace build at that landing also completes. This confirms the compilation fixes on Windows and Linux, beyond source inspection. The Windows Desktop suite is 19 passed / 4 failed, and the landing's macOS Desktop log is 21 passed / 3 failed; I have not isolated the causes of those UI failures. These results do not establish complete runtime acceptance. The newer 7d572089bab6b54ee8cf051a5358775a9d7930f5 branch build is a separate run and is not reported as successful here.
The diagnostics below describe the original PR head and its earlier landings. They should not be read as two unchanged source defects in the current branch. Real CLI, PTY, permissions and recovery acceptance remains outside this limited follow-up.
Original-head evidence
I checked the two new compilation failures introduced at final head 0fb6c5758138aa23bef2026e9a2885f0abb62900: the changed ExternalTask type, its existing engine-test constructor, and the changed evidence reader plus its conditional helper. I also read the original CI logs and verified their actual checkout commits. This is a limited compilation follow-up, not complete acceptance of the 31-file native CLI, PTY, permissions and recovery changes.
Two P2 build regressions were demonstrated at the original head:
- The new required
ExternalTask.live_workspacefield is missing from the constructor inplugins/agent/engine/src/reconcile/tests.rs:681. The PR's Linux root-build, checked out at merge previewd16cb759a678fef92adcb237274983aeb9f61c9a, failscargo test --no-run --workspace --lockedwith E0063. The landing root-build at7382ed22af275c4a1b934deeb0711bd6bd58db3fhas the same error. Serde's default does not fill fields in a Rust struct literal. Update the remaining constructor and verify the full workspace test build. ClosedEvidence::baseline_readernow callsinvalid, but that helper is compiled only undercfg(unix). The PR's Windows build, at the samed16cb759a678fef92adcb237274983aeb9f61c9apreview, fails with E0425 atplatform/process/src/isolated/evidence.rs:444. The landing Windows build confirms the failure at7382ed22af275c4a1b934deeb0711bd6bd58db3f. Make the error constructor available on Windows as well.
The preceding ba3fbe8e9aae335fe57607309f8a0df526bf831d root-build compiles the workspace tests, and its Windows job gets past compilation into native tests. These new errors occur before those tests. The later 1b5638815367802e2286dc232b4f0042a67819f6 logs still contain E0063 and E0425.
I did not run a local Windows build or independently validate real CLI accounts, PTY behavior, persistence compatibility, Host restart, or Stop/recovery. The author's runtime results remain attributed to the author.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
| pub task: ExternalTaskId, | ||
| pub descriptor: ContentRef, | ||
| #[serde(default, skip_serializing_if = "std::ops::Not::not")] | ||
| pub live_workspace: bool, |
There was a problem hiding this comment.
P2: update every Rust constructor when adding this required field. The existing ExternalTask { ... } in plugins/agent/engine/src/reconcile/tests.rs:681 does not set live_workspace. Serde’s default only affects deserialization, so cargo test --no-run --workspace --locked now fails with E0063. This is present in both the PR merge-preview root-build and the landing build; the preceding ba3 workspace test build succeeds. Please update the remaining initializer and rerun the workspace test compilation.
| &self.resource, | ||
| self.snapshot | ||
| .clone() | ||
| .ok_or_else(|| invalid("live task has no baseline"))?, |
There was a problem hiding this comment.
P2: this new call does not compile on Windows. baseline_reader is compiled for every platform, while this module’s invalid helper at line 629 is behind #[cfg(unix)]. The PR Windows job, at merge preview d16cb75, fails with E0425 here; the landing Windows job fails identically. Please make the error constructor available on Windows and check that target.
Summary
After #6713, a read-only conversation could select a native CLI, hide the sandbox selector, and then block the run before launch. Native CLI turns also ran from workspace copies and started fresh native sessions.
Restore the behavior covered by the enablement prompt. Built-in Claude Code, Codex, and Antigravity use the original workspace and account profile with native full access. The composer continues to hide the sandbox selector for these CLIs. Calls back into Maka over MCP still use the session's permissions.
Claude Code runs in an interactive PTY again. All three CLIs resume the same native conversation across Host restarts and receive Maka instructions as a separate user message when the instructions change. Existing Maka history supplies context on the first turn when there is no native session checkpoint.
Refs #6702, #6721, #6713.
Verification
cargo test --release --locked -p maka-cli --test external_jobspassed both tests on macOS. They cover direct writes from a read-only session, native continuation after Host restart, per-turn usage on resume, exact Stop, and recovery without resubmitting the original input.run_commandwrote directly into the original workspace from a read-only Maka session, recorded a tool title, and continued with the same native conversation ID after restarting Host.thread/inject_itemsonly on the first turn andthread/resumeon the second.AI use
OpenAI Codex implemented and verified the change.
Checklist
Does this PR entail a change in behavior?