Commit Graph

2407 Commits

Author SHA1 Message Date
Mahima Shanware 58d2041590 fix(core): trigger JIT directory provisioning synchronously in enter-plan-mode to restore sandbox compatibility
This fixes a regression where sandboxed environments (like Windows bwrap) would crash when attempting to bind the plans directory if it was lazily created after the sandbox was initialized. Additionally, documented the sticky extension context logic in AppContainer to address code review feedback.
2026-04-10 20:04:31 +00:00
Mahima Shanware a99cd0be28 Merge branch 'main' into worktree-con-plan-bug
Resolves conflict in packages/core/src/tools/enter-plan-mode.test.ts by removing an assertion for directory creation, which has been centralized in config.ts in this branch.
2026-04-10 18:00:53 +00:00
Aishanee Shah 31069329bb feat(core): add Strategic Re-evaluation guidance to system prompt (#25062) 2026-04-10 17:15:41 +00:00
Michael Bleigh 3b7c17a22c refactor(core): consolidate execute() arguments into ExecuteOptions (#25101) 2026-04-10 17:11:17 +00:00
Abhi 1d36309f5f chore(core): increase codebase investigator turn limits to 50 (#25125) 2026-04-10 16:56:07 +00:00
Abhi 7d1de3bccc feat(core): persist subagent agentId in tool call records (#25092) 2026-04-10 16:47:25 +00:00
Spencer f6c08a114b fix(core): remove buffer slice to prevent OOM on large output streams (#25094) 2026-04-10 16:33:36 +00:00
Spencer 5fc8fea8d7 fix: resolve lifecycle memory leaks by cleaning up listeners and root closures (#25049) 2026-04-10 04:21:14 +00:00
June 69bf2d75ef fix: decode Uint8Array and multi-byte UTF-8 in API error messages (#23341)
Co-authored-by: Coco Sheng <cocosheng@google.com>
2026-04-10 01:06:54 +00:00
Mahima Shanware 2ca07e8917 fix(core): prevent infinite loop in project registry short ID generation
Adds a hard limit to the while(true) loop in claimNewSlug to prevent tests from hanging indefinitely when fs.existsSync is mocked improperly. Refines error typing in the rename retry block to strictly use isNodeError.
2026-04-10 00:12:24 +00:00
Tommaso Sciortino 55db77bb91 fix(core): silently handle EPERM when listing dir structure (#25066) 2026-04-09 22:25:23 +00:00
Sri Pasumarthi de628b04fc feat(test): add high-volume shell test and refine perf harness (#24983) 2026-04-09 22:23:00 +00:00
Emily Hedlund 451edb3ea6 fix(sandbox): centralize async git worktree resolution and enforce read-only security (#25040) 2026-04-09 22:04:16 +00:00
Spencer 0f7f7be4ef fix(core): clear 5-minute timeouts in oauth flow to prevent memory leaks (#24968) 2026-04-09 21:14:07 +00:00
Spencer f744913584 feat(core): migrate chat recording to JSONL streaming (#23749) 2026-04-09 21:13:55 +00:00
Abhi a7a091360e fix(core): remediate subagent memory leaks using AbortSignal in MessageBus (#25048) 2026-04-09 20:22:26 +00:00
Mahima Shanware 28c5fe7b28 fix(core): mitigate Windows EPERM flakiness in project registry saves
Introduces a retry mechanism for fs.promises.rename when saving the project registry. This resolves a known concurrency issue on Windows CI runners where multiple processes spinning up simultaneously during E2E tests cause file lock contention.
2026-04-09 20:16:58 +00:00
Yuna Seol 20113ee595 fix(core): honor retryDelay in RetryInfo for 503 errors (#25057) 2026-04-09 20:16:36 +00:00
ruomeng 2a5f798863 refactor(plan) Clean default plan toml (#25037) 2026-04-09 20:04:20 +00:00
Abhi 570f0235f8 refactor(core): remove legacy subagent wrapping tools (#25053) 2026-04-09 19:51:36 +00:00
Mahima Shanware c29ab1afb8 fix(core): resolve getErrorMessage visibility and sandbox setting parsing
Moves the getErrorMessage import to the top of config.ts to avoid circularity-induced TS2304 in some environments. Also fixes a TypeError in sandbox_command.js when modern object-style sandbox settings are used in settings.json.
2026-04-09 19:16:56 +00:00
Michael Bleigh e406856343 feat(cli): implement useAgentStream hook (#24292)
Co-authored-by: Adam Weidman <adamfweidman@gmail.com>
Co-authored-by: Adam Weidman <adamfweidman@google.com>
2026-04-09 19:06:27 +00:00
MD. MOHIBUR RAHMAN 5bcb6b619d fix(core): add explicit git identity env vars to prevent sandbox checkpointing error (#19775)
Co-authored-by: David Pierce <davidapierce@google.com>
2026-04-09 17:24:04 +00:00
Abhi b238a453e3 feat(core): refactor subagent tool to unified invoke_subagent tool (#24489) 2026-04-09 16:48:24 +00:00
Emily Hedlund 5724d6be0f refactor(core): use centralized path resolution for Linux sandbox (#24985) 2026-04-09 15:28:58 +00:00
Jarrod Whelan faa7a9da30 feat(cli): refine tool output formatting for compact mode (#24677) 2026-04-09 03:30:52 +00:00
Emily Hedlund 5d589946ad refactor(sandbox): use centralized sandbox paths in macOS Seatbelt implementation (#24984) 2026-04-09 01:29:38 +00:00
Jarrod Whelan bc3ed61adb feat(core): refine shell tool description display logic (#24903) 2026-04-08 23:40:43 +00:00
Tommaso Sciortino d06dba3538 fix(core): dynamic session ID injection to resolve resume bugs (#24972) 2026-04-08 23:27:24 +00:00
Mahima Shanware 08ae3ff9b8 fix(core): align logging and error handling with strict development rules
Addressed reviewer feedback by replacing process.stderr.write with debugLogger.error in config.ts and using isNodeError in storage.ts to adhere to codebase standards.
2026-04-08 23:12:44 +00:00
Emily Hedlund af3638640c fix(core): resolve windows symlink bypass and stabilize sandbox integration tests (#24834) 2026-04-08 22:00:50 +00:00
ruomeng 15f7b24312 feat(plan): require user confirmation for activate_skill in Plan Mode (#24946) 2026-04-08 21:44:53 +00:00
Emily Hedlund a39461718c fix(core): ensure robust sandbox cleanup in all process execution paths (#24763)
Co-authored-by: Spencer <spencertang@google.com>
2026-04-08 19:03:36 +00:00
gemini-cli-robot 3df99d8bcb chore(release): bump version to 0.39.0-nightly.20260408.e77b22e63 (#24939) 2026-04-08 18:10:28 +00:00
Sandy Tao a837b39f8d feat(memory): add /memory inbox command for reviewing extracted skills (#24544) 2026-04-08 18:08:49 +00:00
Mahima Shanware fd8cfad6f9 fix(core): ensure JIT provisioning of plan directory only occurs in active plan mode
Address review bot feedback to prevent EACCES errors during startup by restricting filesystem mutation and workspace context registration to when the user is actively in an interactive plan session. Non-plan tool registration now uses the safely resolved path without attempting to create the directory.
2026-04-08 16:36:40 +00:00
Mahima Shanware 073ecc1d4c fix(core): handle plan dir EEXIST safely and rely on mkdir idempotency
This addresses a potential TOCTOU vulnerability and edge case identified during review. The redundant `fs.existsSync` check in `getPlansDir` has been removed, allowing `fs.mkdirSync(..., { recursive: true })` to safely handle directory idempotency.

By relying directly on `mkdirSync`, we ensure that if a non-directory file already exists at the target path, the system will correctly throw an `EEXIST` error rather than silently treating the file as a directory and crashing later during workspace registration.
2026-04-08 16:36:39 +00:00
Mahima Shanware b9d987b08d perf(core): cache initialized plan directories
Adds caching to getPlansDir to avoid redundant synchronous disk I/O and repeated workspace context registrations.
2026-04-08 16:36:39 +00:00
Mahima Shanware 0c63c05c45 fix(core): address extension context stickiness and symlink path resolution
This commit addresses two bugs identified during review:

1. Cleared the sticky `activeExtensionContext` when the standard `/plan` command is executed, ensuring subsequent prompts correctly target the default global plan directory.
2. Fixed a path resolution regression in `Storage.getPlansDir()` by constructing the fallback ENOENT path directly against the real project root. This prevents `isSubpath` validation failures and potential traversal vulnerabilities when the project root is a symlink.
2026-04-08 16:36:39 +00:00
Mahima Shanware 15aa924932 fix(core): migrate consumers to lazily-evaluated getPlansDir
Updates prompts and tool implementations (edit, write-file, enter/exit plan mode) to route through Config.getPlansDir() instead of Storage.getPlansDir(). This ensures the plan directory is lazily created exactly when these features attempt to use it, preventing ENOENT failures.
2026-04-08 16:34:05 +00:00
Mahima Shanware 2c4d03a843 feat(core): dynamic MRU plan directory resolution and lazy initialization
Introduces active extension context tracking in config to support dynamic switching of plan directories. Resolves circular dependency in storage by deferring plan directory creation until on-demand use, preventing ENOENT errors on non-existent paths.
2026-04-08 16:32:47 +00:00
ruomeng 34b4f1c6e4 refactor(plan): simplify policy priorities and consolidate read-only rules (#24849) 2026-04-08 15:58:29 +00:00
Gaurav e77b22e638 fix: isolate concurrent browser agent instances (#24794) 2026-04-08 14:31:10 +00:00
Gaurav Ghosh e7f8d9cf1a Revert "feat: Introduce an AI-driven interactive shell mode with new"
This reverts commit 651ad63ed6.
2026-04-08 07:31:17 -07:00
Gaurav Ghosh 651ad63ed6 feat: Introduce an AI-driven interactive shell mode with new
`read-shell` and `write-to-shell` tools and a configurable mode setting.
2026-04-08 07:27:28 -07:00
Jacob Richman 7e1938c1bc fix(cli): switch default back to terminalBuffer=false and fix regressions introduced for that mode (#24873) 2026-04-08 05:47:54 +00:00
Anjaligarhwal b9f1d832c8 fix(core): dispose Scheduler to prevent McpProgress listener leak (#24870) 2026-04-08 03:05:53 +00:00
Jacob Richman 28efab483f fix(cli): always show shell command description or actual command (#24774) 2026-04-08 01:52:33 +00:00
Michael Bleigh 16768c08f2 refactor(core): make LegacyAgentSession dependencies optional (#24287)
Co-authored-by: Adam Weidman <adamfweidman@gmail.com>
Co-authored-by: Adam Weidman <adamfweidman@google.com>
2026-04-07 23:45:22 +00:00
Yuna Seol 3c5b5db034 feat(core): use experiment flags for default fetch timeouts (#24261) 2026-04-07 22:35:04 +00:00