feat(code): persist Debug Console Ctrl+L clear across reopen - #4812
Merged
Mason Daugherty (mdrxy) merged 4 commits intoJul 17, 2026
Conversation
The `Ctrl+\` Debug Console modal is recreated fresh on every open and replays the whole in-memory ring buffer, so a `Ctrl+L` clear only lasted for the current session and re-populated on reopen. Persist a process- lifetime "cleared upto" cursor on the app: `DebugConsoleScreen` now takes `cleared_upto` to seed its render cursor and reports each clear back via `on_clear`, and the app seeds/stores the cursor across opens. This stays view-only; the shared buffer is untouched and newly logged records still appear after a clear. Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Mason Daugherty (mdrxy)
marked this pull request as ready for review
July 16, 2026 21:54
Mason Daugherty (mdrxy)
deleted the
mdrxy/code/debug-console-persist-clear
branch
July 17, 2026 18:28
Mason Daugherty (mdrxy)
pushed a commit
that referenced
this pull request
Jul 17, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Release notes preview: keep this section in sync with the package `CHANGELOG.md`. The published GitHub release body is extracted from the merged `CHANGELOG.md` by `release.yml`, not from this PR description._ --- ## [0.1.43](deepagents-code==0.1.42...deepagents-code==0.1.43) (2026-07-17) ### Features - Added classifier-backed Auto approval mode behind `DEEPAGENTS_CODE_EXPERIMENTAL=1` ([#4804](#4804)). - Added a shutdown toast for deferred exits ([#4830](#4830)). - Task descriptions that were truncated can now be expanded by clicking or pressing `Ctrl+O` ([#4811](#4811)). - Debug Console clears with `Ctrl+L` now persist after reopening ([#4812](#4812)). - Added debug logging for skill-name override collisions ([#4772](#4772)). ### Bug Fixes - Keep chat input responsive during `/restart` ([#4808](#4808)). - Fixed paste placeholders disappearing when backspacing a newline below them ([#4757](#4757)). - Made markdown `AppMessage` output selectable ([#4814](#4814)). - Fixed live tool-group counts to include only running tools ([#4809](#4809)). - Kept `task` timers monotonic across nested subagent human-in-the-loop flows ([#4771](#4771)). - Preserved goal criteria proposals when marker clearing fails ([#4785](#4785)). - Reduced repeated probing of an unreachable Ollama daemon to once per reload ([#4806](#4806)). - Quieted MCP auth-skip debug logging for known patterns ([#4805](#4805)). - Improved `/version` diagnostics for editable installs and core dependency reporting, including surfacing `langchain-quickjs` ([#4816](#4816), [#4813](#4813)). - Removed the `uv install` tip from the `/version` update hint ([#4822](#4822)). _End release notes preview._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com>
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
…hain-ai#4812) Clearing the Debug Console (`Ctrl+\`) traceback/log tail with `Ctrl+L` now persists across closing and reopening the console for the process lifetime, instead of re-populating from the in-memory buffer on the next open. --- The console modal is recreated fresh on every open and, on mount, replays everything still retained in the always-on in-memory ring buffer. `Ctrl+L` (`action_clear_view`) was deliberately a view-only clear that advanced only the current instance's render cursor, so closing and reopening replayed the buffer and the "cleared" records came back. This adds a process-lifetime "cleared upto" cursor owned by the app. `DebugConsoleScreen` gains keyword-only `cleared_upto` (seeds its render cursor so a prior clear is honored on open) and `on_clear` (reports the new cursor when `Ctrl+L` fires). `DeepAgentsApp` stores the cursor in `_debug_console_cleared_upto`, seeds each new console from it, and persists updates via the callback. The change stays strictly view-only: the shared ring buffer is never mutated, other diagnostics are unaffected, and records logged *after* a clear still appear. Clearing is by emission time, matching the existing in-session semantics. Made by [Open SWE](https://openswe.vercel.app/agents/58c9cc66-afbe-b468-729d-375b731bbf71) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Release notes preview: keep this section in sync with the package `CHANGELOG.md`. The published GitHub release body is extracted from the merged `CHANGELOG.md` by `release.yml`, not from this PR description._ --- ## [0.1.43](langchain-ai/deepagents@deepagents-code==0.1.42...deepagents-code==0.1.43) (2026-07-17) ### Features - Added classifier-backed Auto approval mode behind `DEEPAGENTS_CODE_EXPERIMENTAL=1` ([langchain-ai#4804](langchain-ai#4804)). - Added a shutdown toast for deferred exits ([langchain-ai#4830](langchain-ai#4830)). - Task descriptions that were truncated can now be expanded by clicking or pressing `Ctrl+O` ([langchain-ai#4811](langchain-ai#4811)). - Debug Console clears with `Ctrl+L` now persist after reopening ([langchain-ai#4812](langchain-ai#4812)). - Added debug logging for skill-name override collisions ([langchain-ai#4772](langchain-ai#4772)). ### Bug Fixes - Keep chat input responsive during `/restart` ([langchain-ai#4808](langchain-ai#4808)). - Fixed paste placeholders disappearing when backspacing a newline below them ([langchain-ai#4757](langchain-ai#4757)). - Made markdown `AppMessage` output selectable ([langchain-ai#4814](langchain-ai#4814)). - Fixed live tool-group counts to include only running tools ([langchain-ai#4809](langchain-ai#4809)). - Kept `task` timers monotonic across nested subagent human-in-the-loop flows ([langchain-ai#4771](langchain-ai#4771)). - Preserved goal criteria proposals when marker clearing fails ([langchain-ai#4785](langchain-ai#4785)). - Reduced repeated probing of an unreachable Ollama daemon to once per reload ([langchain-ai#4806](langchain-ai#4806)). - Quieted MCP auth-skip debug logging for known patterns ([langchain-ai#4805](langchain-ai#4805)). - Improved `/version` diagnostics for editable installs and core dependency reporting, including surfacing `langchain-quickjs` ([langchain-ai#4816](langchain-ai#4816), [langchain-ai#4813](langchain-ai#4813)). - Removed the `uv install` tip from the `/version` update hint ([langchain-ai#4822](langchain-ai#4822)). _End release notes preview._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clearing the Debug Console (
Ctrl+\) traceback/log tail withCtrl+Lnow persists across closing and reopening the console for the process lifetime, instead of re-populating from the in-memory buffer on the next open.The console modal is recreated fresh on every open and, on mount, replays everything still retained in the always-on in-memory ring buffer.
Ctrl+L(action_clear_view) was deliberately a view-only clear that advanced only the current instance's render cursor, so closing and reopening replayed the buffer and the "cleared" records came back.This adds a process-lifetime "cleared upto" cursor owned by the app.
DebugConsoleScreengains keyword-onlycleared_upto(seeds its render cursor so a prior clear is honored on open) andon_clear(reports the new cursor whenCtrl+Lfires).DeepAgentsAppstores the cursor in_debug_console_cleared_upto, seeds each new console from it, and persists updates via the callback.The change stays strictly view-only: the shared ring buffer is never mutated, other diagnostics are unaffected, and records logged after a clear still appear. Clearing is by emission time, matching the existing in-session semantics.
Made by Open SWE