Skip to content

feat(core): migrate chat recording to JSONL streaming#23749

Merged
spencer426 merged 16 commits intomainfrom
23740-chat-recording-jsonl-streaming
Apr 9, 2026
Merged

feat(core): migrate chat recording to JSONL streaming#23749
spencer426 merged 16 commits intomainfrom
23740-chat-recording-jsonl-streaming

Conversation

@spencer426
Copy link
Copy Markdown
Contributor

@spencer426 spencer426 commented Mar 25, 2026

Summary

Migrates ChatRecordingService from rewriting entire large JSON session files to an efficient, append-only JSON Lines (.jsonl) streaming log.

Details

  • JSON Lines Format: Session storage now uses .jsonl. The initial session metadata is written as the first line, followed by individual message objects appended via fs.appendFileSync as they are created or updated.
  • Efficient Loading: initialize() and loadConversationRecord() reconstruct the conversation strictly from the .jsonl log, preserving insertion and update order, without ever holding the full file in memory simultaneously.
  • Memory-Safe List Rendering: Loading operations like sessionUtils.ts (used for rendering the UI's session browser) now utilize a metadataOnly: true option inside loadConversationRecord. This bypasses allocating massive arrays into active RAM entirely, extracting only scalar bounds and string IDs directly from the stream.
  • OOM Resilient File Deletions: deleteSessionAndArtifacts() has been rewritten to open an async fs.promises.FileHandle and read only the first 4KB chunk of the .jsonl file. This safely extracts the metadata sessionId without attempting to load potentially gigabyte-sized files synchronously into Node.js memory.
  • Legacy Compatibility: Added a robust fallback to loadConversationRecord to gracefully read, parse, and process monolithic .json sessions from prior versions of the CLI. This includes correctly computing hasUserOrAssistantMessage, messageCount, and firstUserMessage from legacy payloads when run in metadataOnly mode, ensuring users do not lose their history or break the session UI upon upgrading.

Related Issues

Resolves #23740

How to Validate

  1. Run npm run test or npm run preflight.
  2. Start the CLI (npm start) and run a few prompts.
  3. Observe session-*.jsonl files generated in the .gemini/tmp/chats directory.
  4. Exit the CLI and resume the session (npm start -- --resume). The history should load smoothly.
  5. Ensure old .json sessions are still visible when running npm start -- --resume.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@spencer426 spencer426 requested a review from a team as a code owner March 25, 2026 04:25
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the chat recording mechanism to improve performance and memory efficiency. By transitioning from a monolithic JSON file to a JSON Lines streaming log, the system avoids expensive full-file parsing and unbounded memory consumption, particularly with large conversations or tool outputs. This change ensures that chat history is managed more robustly, allowing for efficient loading and storage while maintaining data integrity.

Highlights

  • JSON Lines (JSONL) Format Adoption: Session storage has been migrated from a single JSON file to an append-only JSON Lines (.jsonl) streaming log. Initial session metadata is written as the first line, with subsequent message objects appended individually.
  • Bounded Memory for Conversations: The active in-memory conversation array (cachedConversation.messages) is now strictly bounded to the last 50 messages to prevent unbounded memory growth.
  • Aggressive Tool Output Truncation: Tool output payloads exceeding 50KB are aggressively truncated in the active memory array, replaced with a placeholder message, while the full content is safely persisted in the JSONL log.
  • Efficient Conversation Loading: The initialize() and loadConversationRecord() functions now reconstruct conversations directly from the .jsonl log, preserving insertion and update order without loading the entire file into memory simultaneously.
  • Refactored Session Utilities: Key utilities in sessionUtils.ts and the SDK's agent.ts have been updated to leverage the new loadConversationRecord() function for reading session logs, eliminating full JSON parsing.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 25, 2026

Size Change: +4.41 kB (+0.01%)

Total Size: 34 MB

Filename Size Change
./bundle/chunk-566LYU6X.js 0 B -3.47 kB (removed) 🏆
./bundle/chunk-ETSDHTGW.js 0 B -1.96 MB (removed) 🏆
./bundle/chunk-JDSH6FD2.js 0 B -14.8 MB (removed) 🏆
./bundle/chunk-LONHTAXY.js 0 B -3.16 MB (removed) 🏆
./bundle/core-D7E3UXGF.js 0 B -45.6 kB (removed) 🏆
./bundle/devtoolsService-OCOUXNDV.js 0 B -28.4 kB (removed) 🏆
./bundle/gemini-ABXPZJXL.js 0 B -552 kB (removed) 🏆
./bundle/interactiveCli-XBPYDL2C.js 0 B -1.64 MB (removed) 🏆
./bundle/oauth2-provider-OFYK3K5G.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-5NENR2YT.js 1.96 MB +1.96 MB (new file) 🆕
./bundle/chunk-USMR747Z.js 3.47 kB +3.47 kB (new file) 🆕
./bundle/chunk-W5YS77RC.js 14.8 MB +14.8 MB (new file) 🆕
./bundle/chunk-Z5E5G2OS.js 3.16 MB +3.16 MB (new file) 🆕
./bundle/core-R3B5MHPN.js 45.7 kB +45.7 kB (new file) 🆕
./bundle/devtoolsService-RPTRHL2H.js 28.4 kB +28.4 kB (new file) 🆕
./bundle/gemini-IINMSRZX.js 552 kB +552 kB (new file) 🆕
./bundle/interactiveCli-ILWVHRV7.js 1.64 MB +1.64 MB (new file) 🆕
./bundle/oauth2-provider-UJFIMEVP.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/bundled/third_party/index.js 8 MB 0 B
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-5PS3AYFU.js 1.18 kB 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/cleanup-ACZHUEBX.js 0 B -856 B (removed) 🏆
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/events-XB7DADIJ.js 418 B 0 B
./bundle/gemini.js 4.97 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-YL35JRSL.js 0 B -980 B (removed) 🏆
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 222 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 229 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 13.4 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/cleanup-HJGAC7DN.js 856 B +856 B (new file) 🆕
./bundle/memoryDiscovery-GD6P6WBI.js 980 B +980 B (new file) 🆕

compressed-size-action

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the chat session recording mechanism to use a JSON Lines (JSONL) format, enabling append-only writes and introducing bounded memory management for in-memory conversation history. Key changes include the introduction of an asynchronous loadConversationRecord function, updates to ChatRecordingService for JSONL handling, and corresponding modifications across the CLI and SDK for session loading and management. However, two high-severity issues were identified: a Denial of Service (DoS) vulnerability in deleteSessionAndArtifacts due to reading entire large files into memory, and another DoS vulnerability in loadConversationRecord where all messages are loaded into memory before truncation, potentially leading to Out-Of-Memory errors.

Comment thread packages/core/src/services/chatRecordingService.ts Outdated
Comment thread packages/core/src/services/chatRecordingService.ts Outdated
@gemini-cli gemini-cli Bot added the area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality label Mar 25, 2026
@spencer426 spencer426 force-pushed the 23740-chat-recording-jsonl-streaming branch from 6255133 to 1b1a67e Compare March 25, 2026 17:07
spencer426

This comment was marked as resolved.

@spencer426 spencer426 force-pushed the 23740-chat-recording-jsonl-streaming branch 2 times, most recently from 984a073 to 2ee3fb3 Compare April 2, 2026 05:59
@spencer426 spencer426 force-pushed the 23740-chat-recording-jsonl-streaming branch from 26ce9d8 to c63f1ac Compare April 8, 2026 18:24
@gemini-cli
Copy link
Copy Markdown
Contributor

gemini-cli Bot commented Apr 8, 2026

Hi there! Thank you for your interest in contributing to Gemini CLI.

To ensure we maintain high code quality and focus on our prioritized roadmap, we have updated our contribution policy (see Discussion #17383).

We only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. All other community pull requests are subject to closure after 14 days if they do not align with our current focus areas. For this reason, we strongly recommend that contributors only submit pull requests against issues explicitly labeled as 'help-wanted'.

This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding and for being part of our community!

@gemini-cli gemini-cli Bot closed this Apr 8, 2026
@spencer426 spencer426 added area/core Issues related to User Interface, OS Support, Core Functionality and removed area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality labels Apr 8, 2026
@spencer426 spencer426 reopened this Apr 8, 2026
@gemini-cli gemini-cli Bot added area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Apr 8, 2026
Copy link
Copy Markdown
Contributor

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments, lmk what you think

Comment thread packages/core/src/core/geminiChat.ts Outdated
Comment thread packages/core/src/core/geminiChat.ts Outdated
Comment thread packages/core/src/services/chatRecordingService.ts Outdated
Comment thread packages/core/src/services/chatRecordingService.ts
Comment thread packages/core/src/services/chatRecordingService.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if a user on a new version (i.e. preview channel) starts a session, decides they want to move back to a stable version.

In that case, the user's client will only look for json trajectories right? In that case, are we ack'ing that we wont support that edge case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation will not support forward-compatibility for this specific downgrade edge case. If a user on a newer version tarts a session, that session will be saved as a .jsonl file. If they then downgrade their CLI back to an older, stable version that predates this feature, their client will only know how to look for and read .json files.

* Migrated ChatRecordingService to use line-delimited JSON (.jsonl).
* Stores session metadata as the first line and appends subsequent message/tool call updates.
* Maintains a bounded in-memory message history array (max 50).
* Truncates large tool results (>50KB) in memory while persisting the full payload to disk.
* Updates `initialize` to parse files efficiently.
* Updates session resumption to load records from JSONL via `loadConversationRecord`.
* Adjusted sdk and cli consumers to handle .jsonl.
* Updated `deleteSessionAndArtifacts` to read only the first chunk of the file
  to prevent reading the entire file into memory synchronously.
* Added `options: { maxMessages, metadataOnly }` to `loadConversationRecord`
  to prevent caching unbound arrays of `MessageRecord`s during initial parses.
* Updated `sessionUtils.ts` and `ChatRecordingService.ts` initializers to utilize these
  new memory bounds, preventing memory exhaustions and resolving PR feedback.
…I UI

* Modified `truncateLargeToolResults` to explicitly overwrite `resultDisplay`
  with the `[Output truncated for memory...]` placeholder. This ensures that
  massive payloads correctly render their truncated form inside the visual UI
  instead of causing terminal stuttering or masking.
* Restored unbounded active memory constraints as per feedback.
* Removed `truncateLargeToolResults`, ensuring full payloads are preserved
  in the active state manager.
* Reverted `MAX_HISTORY_MESSAGES` caps inside the local map loader to
  ensure complete conversation reconstruction.
* Restored unbounded active memory constraints as per feedback.
* Removed `truncateLargeToolResults`, ensuring full payloads are preserved
  in the active state manager.
* Reverted `MAX_HISTORY_MESSAGES` caps inside the local map loader to
  ensure complete conversation reconstruction.
@spencer426 spencer426 force-pushed the 23740-chat-recording-jsonl-streaming branch from d179ad6 to b0a84c9 Compare April 9, 2026 15:27
@spencer426 spencer426 requested a review from abhipatel12 April 9, 2026 16:57
Copy link
Copy Markdown
Contributor

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple more questions!

Comment thread packages/core/src/services/chatRecordingTypes.ts Outdated
Comment thread packages/core/src/agents/local-executor.ts
Comment thread packages/cli/src/utils/sessionUtils.ts
@spencer426 spencer426 force-pushed the 23740-chat-recording-jsonl-streaming branch from 2fa55bd to 4369139 Compare April 9, 2026 19:42
Copy link
Copy Markdown
Contributor

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@spencer426 spencer426 force-pushed the 23740-chat-recording-jsonl-streaming branch from a1bb077 to 36d16d7 Compare April 9, 2026 20:35
@spencer426 spencer426 added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit f744913 Apr 9, 2026
29 checks passed
@spencer426 spencer426 deleted the 23740-chat-recording-jsonl-streaming branch April 9, 2026 21:48
ik-gemini-bot added a commit to spigell/gemini-cli that referenced this pull request Apr 23, 2026
* refactor(plan): simplify policy priorities and consolidate read-only rules (google-gemini#24849)

* feat(test-utils): add memory usage integration test harness (google-gemini#24876)

* feat(memory): add /memory inbox command for reviewing extracted skills (google-gemini#24544)

* chore(release): bump version to 0.39.0-nightly.20260408.e77b22e63 (google-gemini#24939)

* fix(core): ensure robust sandbox cleanup in all process execution paths (google-gemini#24763)

Co-authored-by: Spencer <spencertang@google.com>

* chore: update ink version to 6.6.8 (google-gemini#24934)

* Changelog for v0.38.0-preview.0 (google-gemini#24938)

Co-authored-by: gemini-cli-robot <224641728+gemini-cli-robot@users.noreply.github.com>
Co-authored-by: g-samroberts <samroberts@google.com>

* chore: ignore conductor directory (google-gemini#22128)

Co-authored-by: Coco Sheng <cocosheng@google.com>

* Changelog for v0.37.0 (google-gemini#24940)

Co-authored-by: gemini-cli-robot <224641728+gemini-cli-robot@users.noreply.github.com>
Co-authored-by: Sam Roberts <158088236+g-samroberts@users.noreply.github.com>

* feat(plan): require user confirmation for activate_skill in Plan Mode (google-gemini#24946)

* feat(test-utils): add CPU performance integration test harness (google-gemini#24951)

* fix(core): resolve windows symlink bypass and stabilize sandbox integration tests (google-gemini#24834)

* test(sdk): add unit tests for GeminiCliSession (google-gemini#21897)

* fix(cli): restore file path display in edit and write tool confirmations (google-gemini#24974)

* fix(cli-ui): enable Ctrl+Backspace for word deletion in Windows Terminal (google-gemini#21447)

* fix(core): dynamic session ID injection to resolve resume bugs (google-gemini#24972)

* Update ink version to 6.6.9 (google-gemini#24980)

* feat(core): refine shell tool description display logic (google-gemini#24903)

* Generalize evals infra to support more types of evals, organization and queuing of named suites (google-gemini#24941)

* fix(cli): optimize startup with lightweight parent process (google-gemini#24667)

* refactor(sandbox): use centralized sandbox paths in macOS Seatbelt implementation (google-gemini#24984)

* feat(cli): refine tool output formatting for compact mode (google-gemini#24677)

* fix(sdk): skip broken sendStream tests to unblock nightly (google-gemini#25000)

* refactor(core): use centralized path resolution for Linux sandbox (google-gemini#24985)

* Support ctrl+shift+g (google-gemini#25035)

* feat(core): refactor subagent tool to unified invoke_subagent tool (google-gemini#24489)

* fix(core): add explicit git identity env vars to prevent sandbox checkpointing error (google-gemini#19775)

Co-authored-by: David Pierce <davidapierce@google.com>

* fix: respect hideContextPercentage when FooterConfigDialog is closed without changes (google-gemini#24773)

Co-authored-by: Coco Sheng <cocosheng@google.com>

* fix(cli): suppress unhandled AbortError logs during request cancellation (google-gemini#22621)

* Automated documentation audit (google-gemini#24567)

* feat(cli): implement useAgentStream hook (google-gemini#24292)

Co-authored-by: Adam Weidman <adamfweidman@gmail.com>
Co-authored-by: Adam Weidman <adamfweidman@google.com>

* refactor(core): remove legacy subagent wrapping tools (google-gemini#25053)

* refactor(plan) Clean default plan toml (google-gemini#25037)

* fix(core): honor retryDelay in RetryInfo for 503 errors (google-gemini#25057)

* fix(core): remediate subagent memory leaks using AbortSignal in MessageBus (google-gemini#25048)

* feat(cli): wire up useAgentStream in AppContainer (google-gemini#24297)

Co-authored-by: Adam Weidman <adamfweidman@gmail.com>
Co-authored-by: Adam Weidman <adamfweidman@google.com>

* feat(core): migrate chat recording to JSONL streaming (google-gemini#23749)

* fix(core): clear 5-minute timeouts in oauth flow to prevent memory leaks (google-gemini#24968)

* fix(sandbox): centralize async git worktree resolution and enforce read-only security (google-gemini#25040)

* feat(test): add high-volume shell test and refine perf harness (google-gemini#24983)

* fix(core): silently handle EPERM when listing dir structure (google-gemini#25066)

* Changelog for v0.37.1 (google-gemini#25055)

Co-authored-by: gemini-cli-robot <224641728+gemini-cli-robot@users.noreply.github.com>

* fix: decode Uint8Array and multi-byte UTF-8 in API error messages (google-gemini#23341)

Co-authored-by: Coco Sheng <cocosheng@google.com>

* Automated documentation audit results (google-gemini#22755)

* debugging(ui): add optional debugRainbow setting (google-gemini#25088)

* fix: resolve lifecycle memory leaks by cleaning up listeners and root closures (google-gemini#25049)

* docs(cli): updates f12 description to be more precise (google-gemini#15816)

* fix(cli): mark /settings as unsafe to run concurrently (google-gemini#25061)

* fix(core): remove buffer slice to prevent OOM on large output streams (google-gemini#25094)

* feat(core): persist subagent agentId in tool call records (google-gemini#25092)

* chore(core): increase codebase investigator turn limits to 50 (google-gemini#25125)

* refactor(core): consolidate execute() arguments into ExecuteOptions (google-gemini#25101)

* feat(core): add Strategic Re-evaluation guidance to system prompt (google-gemini#25062)

* fix(core): preserve shell execution config fields on update (google-gemini#25113)

* docs: add vi shortcuts and clarify MCP sandbox setup (google-gemini#21679)

Co-authored-by: Jenna Inouye <jinouye@google.com>

* fix(cli): pass session id to interactive shell executions (google-gemini#25114)

* fix(cli): resolve text sanitization data loss due to C1 control characters (google-gemini#22624)

* feat(core): add large memory regression test (google-gemini#25059)

* fix(core): resolve PTY exhaustion and orphan MCP subprocess leaks (google-gemini#25079)

* chore: switch from keytar to @github/keytar (google-gemini#25143)

* chore(deps): update vulnerable dependencies via npm audit fix (google-gemini#25140)

* perf(sandbox): optimize Windows sandbox initialization via native ACL application (google-gemini#25077)

* fix: improve audio MIME normalization and validation in file reads (google-gemini#21636)

Co-authored-by: Coco Sheng <cocosheng@google.com>

* docs: Update docs-audit to include changes in PR body (google-gemini#25153)

* docs: correct documentation for enforced authentication type (google-gemini#25142)

* fix(cli): exclude update_topic from confirmation queue count (google-gemini#24945)

* Memory fix for trace's streamWrapper. (google-gemini#25089)

* fix(core): fix quota footer for non-auto models and improve display (google-gemini#25121)

* docs(contributing): clarify self-assignment policy for issues (google-gemini#23087)

* feat(core): add skill patching support with /memory inbox integration (google-gemini#25148)

* Stop suppressing thoughts and text in model response (google-gemini#25073)

* fix(release): prefix git hash in nightly versions to prevent semver normalization (google-gemini#25304)

* feat(cli): extract QuotaContext and resolve infinite render loop (google-gemini#24959)

* refactor(core): extract and centralize sandbox path utilities (google-gemini#25305)

Co-authored-by: David Pierce <davidapierce@google.com>

* feat(ui): added enhancements to scroll momentum (google-gemini#24447)

* fix(core): replace custom binary detection with isbinaryfile to correctly handle UTF-8 (U+FFFD) (google-gemini#25297)

* feat(agent): implement tool-controlled display protocol (Steps 2-3) (google-gemini#25134)

* Stop showing scrollbar unless we are in terminalBuffer mode (google-gemini#25320)

* fix(core): expose GEMINI_PLANS_DIR to hook environment (google-gemini#25296)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* feat: support auth block in MCP servers config in agents (google-gemini#24770)

* feat(core): implement silent fallback for Plan Mode model routing (google-gemini#25317)

* fix: correct redirect count increment in fetchJson (google-gemini#24896)

Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>

* fix(core): prevent secondary crash in ModelRouterService finally block (google-gemini#25333)

* feat(core): introduce decoupled ContextManager and Sidecar architecture (google-gemini#24752)

* docs(core): update generalist agent documentation (google-gemini#25325)

* chore(mcp): check MCP error code over brittle string match (google-gemini#25381)

* test(core): improve sandbox integration test coverage and fix OS-specific failures (google-gemini#25307)

Co-authored-by: David Pierce <davidapierce@google.com>

* feat(plan): update plan mode prompt to allow showing plan content (google-gemini#25058)

* fix(core): use debug level for keychain fallback logging (google-gemini#25398)

* feat(test): add a performance test in asian language (google-gemini#25392)

* feat(cli): enable mouse clicking for cursor positioning in AskUser multi-line answers (google-gemini#24630)

* fix(core): detect kmscon terminal as supporting true color (google-gemini#25282)

Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* ci: add agent session drift check workflow (google-gemini#25389)

* use macos-latest-large runner where applicable. (google-gemini#25413)

* Changelog for v0.37.2 (google-gemini#25336)

Co-authored-by: gemini-cli-robot <224641728+gemini-cli-robot@users.noreply.github.com>

* chore(release): v0.39.0-preview.0

* fix(patch): cherry-pick a4e98c0 to release/v0.39.0-preview.0-pr-25138 to patch version v0.39.0-preview.0 and create version 0.39.0-preview.1 (google-gemini#25766)

Co-authored-by: Mahima Shanware <mahima.shanware@gmail.com>

* chore(release): v0.39.0-preview.1

* fix(patch): cherry-pick d6f88f8 to release/v0.39.0-preview.1-pr-25670 to patch version v0.39.0-preview.1 and create version 0.39.0-preview.2 (google-gemini#25776)

Co-authored-by: Adam Weidman <65992621+adamfweidman@users.noreply.github.com>

* chore(release): v0.39.0-preview.2

* chore(release): v0.39.0

---------

Co-authored-by: ruomeng <ruomeng@google.com>
Co-authored-by: Sri Pasumarthi <111310667+sripasg@users.noreply.github.com>
Co-authored-by: Sandy Tao <sandytao520@icloud.com>
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
Co-authored-by: Emily Hedlund <ehedlund@google.com>
Co-authored-by: Spencer <spencertang@google.com>
Co-authored-by: Jacob Richman <jacob314@gmail.com>
Co-authored-by: gemini-cli-robot <224641728+gemini-cli-robot@users.noreply.github.com>
Co-authored-by: g-samroberts <samroberts@google.com>
Co-authored-by: JAYADITYA <96861162+JayadityaGit@users.noreply.github.com>
Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Sam Roberts <158088236+g-samroberts@users.noreply.github.com>
Co-authored-by: Adamya Singh <adamyasingh54@gmail.com>
Co-authored-by: Jarrod Whelan <150866123+jwhelangoog@users.noreply.github.com>
Co-authored-by: dogukanozen <dogukannozen@hotmail.com>
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
Co-authored-by: Christian Gunderman <gundermanc@google.com>
Co-authored-by: Sehoon Shon <sshon@google.com>
Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com>
Co-authored-by: MD. MOHIBUR RAHMAN <35300157+mrpmohiburrahman@users.noreply.github.com>
Co-authored-by: David Pierce <davidapierce@google.com>
Co-authored-by: chernistry <73943355+chernistry@users.noreply.github.com>
Co-authored-by: euxaristia <25621994+euxaristia@users.noreply.github.com>
Co-authored-by: Michael Bleigh <mbleigh@mbleigh.com>
Co-authored-by: Adam Weidman <adamfweidman@gmail.com>
Co-authored-by: Adam Weidman <adamfweidman@google.com>
Co-authored-by: Yuna Seol <yunaseol@gmail.com>
Co-authored-by: June <kimjune01@gmail.com>
Co-authored-by: Aishanee Shah <aishaneeshah@google.com>
Co-authored-by: Jason Matthew Suhari <jasonmatthewsuhari@gmail.com>
Co-authored-by: Christopher Thomas <cobekgn@gmail.com>
Co-authored-by: Jenna Inouye <jinouye@google.com>
Co-authored-by: cynthialong0-0 <82900738+cynthialong0-0@users.noreply.github.com>
Co-authored-by: M Junaid Shaukat <154750865+junaiddshaukat@users.noreply.github.com>
Co-authored-by: Abhijit Balaji <abhijitbalaji@google.com>
Co-authored-by: Mark Griffith <anthraxmilkshake@hotmail.com>
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
Co-authored-by: Jesse Rosenstock <jesse.rosenstock@gmail.com>
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
Co-authored-by: Dev Randalpura <devrandalpura@google.com>
Co-authored-by: Anjaligarhwal <anjaligarhwal1610@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Tanmay Vartak <9002434+TanmayVartak@users.noreply.github.com>
Co-authored-by: Jerop Kipruto <jerop@google.com>
Co-authored-by: Kevin Zhao <kevin8093@126.com>
Co-authored-by: joshualitt <joshualitt@google.com>
Co-authored-by: Clay <claygeo6@gmail.com>
Co-authored-by: Adam Weidman <65992621+adamfweidman@users.noreply.github.com>
Co-authored-by: Mahima Shanware <mahima.shanware@gmail.com>
Co-authored-by: codex-bot <spigelly+gh-bot@gmail.com>
channyzf6 added a commit to channyzf6/sessions-dashboard that referenced this pull request Apr 23, 2026
Two independent dashboard bugs surfaced by a user report.

Phase A — dashboard edit-freeze. isEditingName() in the poll() guard
wedged the entire dashboard whenever any group-name contenteditable
held focus, freezing every card's pill across all hosts. A user
clicking + New group (which auto-focuses the new name span) and
walking away triggered it indefinitely. Move the gate to render()'s
structural-rebuild branch only — the in-place pill-update fast-path
keeps running during edits, only group-header rebuilds defer until
blur. Add a global pointerdown blur-on-outside handler so abandoned
focus auto-clears.

Phase B — Gemini 0.39.0+ JSONL support. Per
google-gemini/gemini-cli#23749, Gemini CLI 0.39.0 migrated from
atomic .json full-file rewrites to append-only .jsonl streaming.
GeminiAdapter only matched .json in _locate and used a single
JSON.parse in scanActivity, so 0.39.0+ users silently got null pills
— the adapter found nothing to read.

Adds parseJsonl() that walks the documented record types (header,
MessageRecord, MetadataUpdateRecord {\$set:{...}}, RewindRecord
{\$rewindTo:"<id>"}) and materializes the same ConversationRecord
shape the existing _deriveSnapshot() consumes; zero changes to the
derive logic. scanActivity() dispatches by file extension; _locate()
accepts both. registry.mjs probeGeminiDir got the same extension-
filter fix so cross-host detection tie-breaks remain accurate for
fresh ≥0.39 installs in mixed-host environments.

Adds a node:test scaffold (zero new dependencies — uses Node's
built-in test runner) with 7 fixture-driven tests: legacy regression,
JSONL basic, \$set merge, \$rewindTo truncation, malformed-line skip,
partial-trailing-line survival.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop buffering full conversation history in memory for session saves

2 participants