mirror of
https://github.com/langchain-ai/deepagents.git
synced 2026-08-27 10:51:26 -04:00
deepagents-code==0.1.63
1049 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
970003e60b |
release(deepagents-code): 0.1.63 (#5834)
> [!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`. Publish reads the merged CHANGELOG via `release.yml`, not this PR description — keep them aligned anyway so the PR stays an accurate historical record for reviewers and anyone returning later._ --- ## [0.1.63](https://github.com/langchain-ai/deepagents/compare/deepagents-code==0.1.62...deepagents-code==0.1.63) (2026-08-26) ### Features - Added Baseten `zai-org/GLM-5.3-Flash` to the model switcher ([#5844](https://github.com/langchain-ai/deepagents/issues/5844)). - Added support for loading managed config from a remote source ([#5776](https://github.com/langchain-ai/deepagents/issues/5776)). - Added retry middleware for transient model errors in model nodes ([#4569](https://github.com/langchain-ai/deepagents/issues/4569)). ### Fixes - Fixed live cost tracking for dynamic subagents ([#5833](https://github.com/langchain-ai/deepagents/issues/5833)). - Improved `clear` command descriptions ([#5841](https://github.com/langchain-ai/deepagents/issues/5841)). - Allowed instrumental Auto actions ([#5832](https://github.com/langchain-ai/deepagents/issues/5832)). - Ensured traces are flushed before server shutdown ([#5837](https://github.com/langchain-ai/deepagents/issues/5837)). - Made the debug log path click-to-copy ([#5845](https://github.com/langchain-ai/deepagents/issues/5845)). _End release notes preview._ --- > [!NOTE] > A **community contributors** list and a **Special thanks** section (crediting the users who filed the issues this release's PRs closed) are 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 3). --------- 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> |
||
|
|
948fea88e2 |
feat(code): model-node retry middleware for transient model errors (#4569)
Deep Agents Code now retries transient model request failures automatically. If a request fails because of a dropped connection, a rate limit, or a provider server error, dcode waits and tries again instead of failing the turn. This covers the main agent, subagents, goal-criteria checks, conversation compaction, auto-mode classification, and rubric grading even when the grader connection drops mid-response. How retrying works: - Retries happen at the individual model call, not the whole turn, so tool calls that already completed are never replayed. - If a response started streaming to your terminal before the failure, that attempt is not retried — this prevents duplicated output. Rubric-grader messages are the narrow exception: both clients filter that nested stream, so the failed grader model call can retry without duplicating visible output. - You can see retry progress in the terminal, both interactively and in headless mode. - Rate-limit responses that carry a valid `Retry-After` header wait as directed, up to 60 seconds. Other failures use an exponential backoff (starting at 0.2s, doubling up to a 10s cap, with jitter). - Permanent failures — authentication errors, permission denials, invalid requests, context overflow — fail immediately without burning retries. - Auto-mode classification runs under a deadline, so its total retry wait is capped to fit inside it; a rate-limited classifier surfaces the provider error rather than stalling. Controlling retries: - `--max-retries N` (or `[retries] max_retries = N` in `config.toml`) sets how many retries follow the initial request. The default is 5; `0` disables retries entirely. Set `[retries.<provider>]` to override per provider. - These settings now control dcode's own retry loop. Previously they set the provider SDK's retry count; that loop is disabled so the two don't multiply. If dcode can't identify the provider's retry control, it warns you, since the provider may still be retrying underneath. - Retries outside the main agent loop (compaction summaries, classifiers, rubric grading) apply to models dcode builds itself. A model you supply directly gets the default budget of 5, with a warning if its own SDK retry loop is also still active. Rubric grading retains its earlier mid-response reliability. Grader messages stream under a nested namespace that both interactive and headless clients filter, and unidentified nested messages are excluded from hook transcripts. Only the grader's retry middleware marks that stream as hidden, allowing dropped reads and truncated bodies to retry the failed model node without replaying completed verification tools. Main-agent and other visible streams keep the duplicate-output guard. --- <details> <summary>Test plan</summary> - Focused model-retry, rubric-grader, client-rendering, transcript, and agent-wiring tests: 152 passed - Ruff checks for all touched files - `ty` checks for all touched files - Pre-commit hooks </details> Made by [Open SWE](https://openswe.vercel.app/agents/7fe4aaa6-4f25-5c78-b472-91ae81e8c1b5) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
ffae2ebdbd |
test(code): pin Unicode charset in diff rendering tests (#5846)
Fixes #5843 --- The `deepagents-code` Python 3.12 unit-test leg failed three `test_diff.py` assertions that expected the Unicode line-continuation glyph `…` but rendered the ASCII fallback `.`. The same tests passed on 3.13 and 3.14, and the PR that hit the failure did not touch the diff renderer. The diff widget reads `get_glyphs()`, which caches the detected charset mode in a process-wide module variable. Several tests in `test_charset.py` patch `UI_CHARSET_MODE` to force ASCII or Unicode and reset that cache in `setup_method` — before each test — but never reset it afterward. `TestIsAsciiMode::test_true_in_ascii_mode` therefore leaves the cache pinned to ASCII. Whether any later test in the same pytest-xdist worker inherits that state depends entirely on how tests are distributed across workers, which is why the failure surfaced only on the 3.12 leg and disappeared under other run orders. Two changes make the intended behavior deterministic across the matrix: - `test_charset.py` now uses an autouse fixture that resets the glyph cache both before and after each test, so a forced charset cannot leak into unrelated tests. - `test_diff.py` now sets `UI_CHARSET_MODE=unicode` and resets the cache around every test, so the rendering expectations no longer depend on ambient process state. |
||
|
|
1fc7d1e26d |
fix(code): make debug log path click-to-copy (#5845)
The debugger's active debug log file path can now be copied by clicking it; in-memory fallback text remains non-interactive. --- The snapshot reuses the existing safe copy-span behavior and preserves defensive fallback handling. Made by [Open SWE](https://openswe.vercel.app/agents/ef160ebe-a941-5809-bc2f-77be98bb1105) Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
731d2d5a56 |
feat(code): add Baseten zai-org/GLM-5.3-Flash to model switcher (#5844)
Adds Z.ai's GLM-5.3-Flash to the dcode model switcher for Baseten, so it can be picked from `/model` and the onboarding picker instead of typed in by hand. --- Z.ai released [GLM-5.3-Flash](https://z.ai/blog/glm-5.3-flash) on 2026-08-26, its first natively multimodal model in the GLM-5 series (320B total / 18B active, hybrid linear and sparse attention, 1M context, MIT licensed). Baseten made it available through Model APIs the same day, per their [changelog](https://www.baseten.co/resources/changelog/glm-53-fast-available-on-baseten/) and [model page](https://www.baseten.co/library/glm-53-flash/). The `baseten` provider is already wired into `PROVIDER_API_KEY_ENV`, and `_RECOMMENDED_MODELS` already carries `zai-org/GLM-5.2` and `zai-org/GLM-5.2-Fast`, so this only needs the new spec and its display name. The model ID `zai-org/GLM-5.3-Flash` is taken verbatim from Baseten's own model page rather than derived from another provider's naming scheme. The entry is placed alphabetically within the existing `baseten:` block, and the display name follows the sibling GLM entries. Only the Baseten entry is added here. Other providers that may serve this model are intentionally out of scope for this PR. |
||
|
|
804fdcc436 |
fix(code): flush traces before server shutdown (#5837)
`dcode -x` now drains pending LangSmith traces before its child server exits. --- The child `langgraph dev` process could terminate before final trace updates left the SDK queue. The custom HTTP app now flushes existing tracers during lifespan shutdown on a bounded daemon worker, so a stuck telemetry call cannot delay exit. The parent uses graceful process-group signaling on POSIX and Ctrl+Break for a dedicated Windows process group, with enough shutdown margin for both the trace flush and LangGraph teardown. No tracing client is created when tracing is disabled. <details> <summary>Test plan</summary> - Unit coverage for successful, failed, disabled, and timed-out flushes - Cross-platform server termination unit coverage - Real `langgraph dev` subprocess shutdown test - `make lint` </details> --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
1f5906427d |
style(code): mark wrapped diff continuations (#5836)
Wrapped diff lines now show a styled ellipsis in the line-number gutter and keep continuation text aligned with source content. --- This follows Textual Diff View’s continuation-gutter approach while preserving syntax styles, selection highlighting, copied source text, and ASCII fallback. **Before**  **After**  Made by [Open SWE](https://openswe.vercel.app/agents/705c5c7d-fc6d-590a-bfbf-fb216379536e) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
a6b069db38 |
fix(code): clarify clear command descriptions (#5841)
`/clear` now emphasizes starting fresh, while `/force-clear` is framed as recovery for a stuck session. --- The previous descriptions focused on implementation details and made the intended use cases hard to distinguish. The generated command catalog is updated from the registry. Made by [Open SWE](https://openswe.vercel.app/agents/e6814be2-5315-55be-aca4-e8542b57afb0) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
738bf077f8 |
feat(code): define and discover Python extensions (#5631)
Related #5556 Defines the narrow Python extension API, registry, provenance model, and deterministic source discovery. Extension discovery remains disabled unless `DEEPAGENTS_CODE_EXPERIMENTAL` is truthy. --- Layer 1 of 4. This layer owns registration validation and collision handling, transactional rollback primitives, plugin manifest declarations, and discovery from user, configured, temporary CLI, plugin, entry-point, and trusted project sources. Configuration, loading, graph hosting, and user-facing trust controls are deliberately excluded. ## Stack 1. [#5631 — API, registry, and discovery](https://github.com/langchain-ai/deepagents/pull/5631) 2. [#5632 — configuration, trust, and loading](https://github.com/langchain-ai/deepagents/pull/5632) 3. [#5633 — agent hosting and lifecycle](https://github.com/langchain-ai/deepagents/pull/5633) 4. [#5634 — trust and inspection UX](https://github.com/langchain-ai/deepagents/pull/5634) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
56f51d83a7 |
fix(code,evals): allow instrumental Auto actions (#5832)
Auto mode now permits ordinary instrumental coding steps without requiring users to name every implementation detail, while high-risk effects still require explicit authorization. --- The classifier policy’s blanket deny clause overrode its allowance for reasonably necessary work. This replaces incident-specific prompt examples with a concise effect-based precedence rule and moves those examples into paired semantic evals. Local-content exfiltration and shell-sourced environment files remain gated. ### Eval coverage | Expected | Cases | |---|---| | Allow | relevant credential-free public read; configured first-party analysis; managed scratch consumption; bounded local app reproduction; in-repo verification | | Deny | local content to an unconfigured destination; shell-sourced project environment; durable host persistence; destructive outside-worktree action; credential transmission | Made by [Open SWE](https://openswe.vercel.app/agents/4573fec8-4afc-5d95-9969-79451c9d297a) ## References - Plan: https://openswe.vercel.app/agents/4573fec8-4afc-5d95-9969-79451c9d297a/plan --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
9f3a1dd38f |
feat(code): load managed config from a remote source (#5776)
Administrators can point the fixed managed-config file at a bounded HTTPS TOML policy. --- This adds remote managed configuration while keeping the fixed local descriptor as the trust anchor. The remote document supplies the complete managed policy. Remote loading: - uses system TLS validation and bypasses proxies - refuses redirects - enforces a 5-second timeout and 1 MiB response limit - fails closed during startup - preserves the last-known-good policy when a reload fails --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
37d7777195 |
fix(code): track live dynamic subagent cost (#5833)
Dynamic subagent model usage now appears in live dcode cost and usage statistics. ```mermaid flowchart LR A[Dynamic subagent request] --> B[Session cost recorder] B -->|Versioned usage event| C[Live Textual and headless stats] B -->|Drain raw usage| D[Cost middleware] D -->|Checkpoint and authoritative total| C ``` Streams completed dynamic-subagent usage into existing provisional client accounting while preserving checkpointed graph cost as the durable authority. Events are minimized, thread-validated, deduplicated, and best-effort. ## References - Plan: https://openswe.vercel.app/agents/4f3fc359-7153-5467-8164-33aa496b8a56/plan Made by [Open SWE](https://openswe.vercel.app/agents/4f3fc359-7153-5467-8164-33aa496b8a56) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
dc27a2fc29 |
release(deepagents-code): 0.1.62 (#5778)
> [!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`. Publish reads the merged CHANGELOG via `release.yml`, not this PR description — keep them aligned anyway so the PR stays an accurate historical record for reviewers and anyone returning later._ --- ## [0.1.62](https://github.com/langchain-ai/deepagents/compare/deepagents-code==0.1.61...deepagents-code==0.1.62) (2026-08-26) ### Features - Added `/context-doctor` for inspecting and troubleshooting context issues ([#5830](https://github.com/langchain-ai/deepagents/issues/5830)). - Added warning when switching models mid-session ([#5829](https://github.com/langchain-ai/deepagents/issues/5829)). - Added support for `DEEPAGENTS_HOME` ([#5773](https://github.com/langchain-ai/deepagents/issues/5773)). - (Re-)Enabled secret redaction by default ([#5816](https://github.com/langchain-ai/deepagents/issues/5816)). - Improved update visibility by showing cached updates in version output ([#5817](https://github.com/langchain-ai/deepagents/issues/5817)). - Improved prompts and pickers: the stale editable-deps prompt now defaults to `Refresh environment now`, and the model picker shows an Escape hint ([#5810](https://github.com/langchain-ai/deepagents/issues/5810), [#5775](https://github.com/langchain-ai/deepagents/issues/5775)). - Added CLI config provider support ([#5774](https://github.com/langchain-ai/deepagents/issues/5774)). ### Bug Fixes - Fixed refreshed local context handling after compaction to reduce cache busts ([#5828](https://github.com/langchain-ai/deepagents/issues/5828)). - Preserved goal notice history for prompt caching ([#5823](https://github.com/langchain-ai/deepagents/issues/5823)). - Improved rubric coverage checks ([#5369](https://github.com/langchain-ai/deepagents/issues/5369)). - Protected the TUI from native stderr writes ([#5813](https://github.com/langchain-ai/deepagents/issues/5813)). - Fixed Git origin resolution from worktree common Git directories ([#5818](https://github.com/langchain-ai/deepagents/issues/5818)). - Fixed prompt clipboard behavior so Tab inserts instead of pages ([#5820](https://github.com/langchain-ai/deepagents/issues/5820)). ### Performance Improvements - Reduced tracing overhead by omitting middleware trace inputs ([#5815](https://github.com/langchain-ai/deepagents/issues/5815)). _End release notes preview._ --- > [!NOTE] > A **community contributors** list and a **Special thanks** section (crediting the users who filed the issues this release's PRs closed) are 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 3). --------- 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> |
||
|
|
acc3d33f35 |
feat(code): confirm model switches with large context (#5829)
`deepagents-code` now warns before switching models with large active contexts; configure `warnings.model_switch_token_threshold` (default `100000`, `0` disables). <img width="648" height="298" alt="Screenshot" src="https://github.com/user-attachments/assets/6fbd0d6d-882b-4d80-a422-05bc1a4bc0f4" /> --- Require explicit confirmation before user-initiated model switches when the active thread exceeds a configurable context-token threshold, reducing accidental cache loss and context-limit surprises. Made by [Open SWE](https://openswe.vercel.app/agents/62d82b6f-f2f2-5c88-9467-ba9e99d2382e) ## References - Plan: https://openswe.vercel.app/agents/62d82b6f-f2f2-5c88-9467-ba9e99d2382e/plan --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
feb5736dfb |
feat(code): support DEEPAGENTS_HOME (#5773)
Closes #5757 `DEEPAGENTS_HOME` now selects the dcode user profile and trust root at launch while preserving `~/.deepagents` as the default. --- This makes the configured home an immutable, normalized path captured before dotenv loading and shared by the client, server, reloads, and child processes. A central path snapshot separates profile data, installation-owned resources, and project configuration so cwd changes and mutable environment state cannot move the trust root. Absolute profiles also remain usable when the launch user's home cannot be resolved; optional home-based integrations are skipped in that case. Profile resolution rejects ambiguous or unsafe roots, including relative and `~user` forms, filesystem and launch-home aliases, dangling symlinks, non-directories, and unreadable or unsearchable directories. The installer applies the same validation as Python and changes ownership only for exact leaves it creates. MCP discovery now retains explicit user or project provenance. Only the exact configured user `.mcp.json` receives user-level trust, and filesystem aliases or collisions fail closed to project scope. This prevents project dotenv files, ancestor homes, checkout-contained profiles, and case or symlink aliases from self-approving project MCP servers. Install and update locks and managed ripgrep prefer installation-scoped locations, with profile-scoped fallbacks when the shared locations are unusable. A fallback ripgrep is checksum-verified and exposed through a process-private `PATH` shim so profile-controlled sibling executables never enter subprocess lookup. Runtime consumers, prompts, bundled skills, UI messages, diagnostics, and token permission hints use the effective configured paths, and failed write-probe cleanup is surfaced without repeated warnings. <details> <summary>Test plan</summary> - Added deterministic path, dotenv, cwd, reload, client/server, missing-home, and subprocess regressions. - Added root-validation and installer parity coverage, including symlink, permission, ownership, and write-probe cases. - Added MCP provenance, filesystem-identity, trust-classification, and project self-approval security regressions. - Added shared-lock, managed-ripgrep fallback, checksum, private-`PATH`-shim, and optional-ripgrep regressions. - Added prompt, bundled-skill, diagnostics, and MCP token-path consumer regressions. - Current-head validation is covered by the `deepagents-code` lint job and Python 3.12–3.14 test matrix. </details> --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
80719ceee8 |
feat(code): /context-doctor (#5830)
`dcode` now includes `/context-doctor` for auditing injected context and token costs. <img width="719" height="395" alt="Screenshot" src="https://github.com/user-attachments/assets/0f9411d3-906b-4604-975f-1504e85735cb" /> --- Add `/context-doctor` to expose the approximate token cost of base instructions, memory, skills, built-in tool schemas, MCP tools, and conversation history. The report degrades honestly for uninspectable agents and reconciles estimates with provider-reported usage when available. Made by [Open SWE](https://openswe.vercel.app/agents/368aa683-e22c-580f-b04c-7dc490601b5c) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
3a78de7c3f |
fix(code): append refreshed local context after compaction (#5828)
Agents now preserve the original local-context prompt for provider cache stability while still seeing environment changes after compaction. --- Local context is detected once for the stable system-prompt prefix. After compaction, changed context is appended as an internal model-visible message and filtered from user-facing transcripts, counts, titles, and hooks. Made by [Open SWE](https://openswe.vercel.app/agents/e0a6bda9-5a85-5b67-843d-41771d7a7905) ## References - Plan: https://openswe.vercel.app/agents/e0a6bda9-5a85-5b67-843d-41771d7a7905/plan --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
4ef1ae67da |
chore(code): remove low-value unit tests (#5827)
Remove tests that only exercise local expressions, language/dataclass mechanics, annotations, or source text, plus an exact duplicate and assertions already covered by stronger behavior tests. Production behavior and meaningful regression coverage are unchanged. Made by [Open SWE](https://openswe.vercel.app/agents/105f8f81-8407-5183-be73-7f5df20dd8f7) Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
fd7d268227 |
feat(code): enable secret redaction by default (#5816)
LangSmith trace secret redaction is enabled by default again; explicit environment or `config.toml` opt-outs remain supported. --- This restores the security-preserving default and retains the existing fail-closed anonymizer setup. Made by [Open SWE](https://openswe.vercel.app/agents/4db4dced-66c8-5094-a0e5-de4946cb052c) Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
aa8ae71864 |
fix(code): preserve goal notice history for prompt caching (#5823)
Goal and rubric transitions now preserve the existing model-request prefix so prompt caches remain reusable. --- `GoalToolsMiddleware` now preserves bounded prior notices for prompt caching while replacing oversized legacy notices with bounded same-index stand-ins. <details> <summary>Test plan</summary> - `uv run --directory libs/code --group test pytest -q --disable-warnings tests/unit_tests/test_goal_tools.py tests/unit_tests/test_goal_state_notice.py` - `make -C libs/code lint` </details> Made by [Open SWE](https://openswe.vercel.app/agents/a3420123-6498-52b5-a027-f37b7da6698d) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
951a1cf54b |
feat(code): CLI config provider (#5774)
Session-scoped CLI flags now use shared configuration resolution, so managed policy wins consistently and users are warned when a flag is overridden or rejected. --- CLI values previously reached runtime consumers outside the shared resolver, causing inconsistent behavior across launches, configuration inspection, ACP, thread listing, and tools. This adds an immutable `CliProvider` between managed configuration and the environment and gives every resolver the same CLI snapshot. Consumers now read effective resolved values, while deduplicated warnings explain managed overrides and rejected flags. Existing flag behavior and startup fast paths are preserved. --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
8e03e9c37f |
fix(code): make prompt clipboard Tab insert (#5820)
Tab now inserts the selected prompt like <kbd>Enter</kbd>; <kbd>Shift</kbd>+<kbd>Tab</kbd> no longer pages prompt options. --- This removes both prompt-paging bindings and their obsolete handlers while preserving arrow-key navigation. Made by [Open SWE](https://openswe.vercel.app/agents/2951d58f-a6fd-568e-a776-897b3480b9ba) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
2271312601 |
chore(deps): bump deepagents pin in deepagents-code to 0.7.9 (#5819)
Bumps the exact `deepagents` pin in `libs/code/pyproject.toml` from `0.7.8` to `0.7.9` (current workspace SDK version) and regenerates `libs/code/uv.lock`. Opened automatically by `bump_code_sdk_pin.yml` after a commit on `main` changed the SDK version. Merge this before the next `deepagents-code` release so the SDK pin check goes green. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
2ab22a1edc |
chore(code): prune redundant unit tests (#5825)
Remove 20 low-signal test functions and 13 duplicate parameter cases from `libs/code`. The retained coverage focuses on project behavior rather than constants, framework behavior, third-party internals, or duplicated parser/UI checks. Made by [Open SWE](https://openswe.vercel.app/agents/3d6338e8-c4ab-58be-8470-807c497747cb) Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
a8ae71480f |
fix(code): resolve origin from worktree common Git dir (#5818)
Linked-worktree pushes in Auto mode now recognize the repository's configured `origin` instead of being denied as external sharing. --- `read_git_remote_url_from_filesystem` now reads config from the validated common Git directory, while malformed or forged worktree pointers remain fail-closed. Added genuine linked-worktree and forged-pointer regressions. Made by [Open SWE](https://openswe.vercel.app/agents/8d7bdc5b-1f0a-57be-af8c-eb7600ec3e79) ## References - Plan: https://openswe.vercel.app/agents/8d7bdc5b-1f0a-57be-af8c-eb7600ec3e79/plan --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
a201b74e54 |
chore(code): prune redundant unit tests (#5822)
Remove duplicate and legacy unit coverage while retaining unique production behavior, parser contracts, Unicode-safety checks, and interaction tests. Consolidates formatter coverage in its dedicated test module and removes exact duplicate app/help/tool assertions. Made by [Open SWE](https://openswe.vercel.app/agents/0b0b6250-518b-55eb-98b6-e7c5f67efb64) ## References - Plan: https://openswe.vercel.app/agents/0b0b6250-518b-55eb-98b6-e7c5f67efb64/plan --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
b6a77921ce |
feat(code): show cached updates in version output (#5817)
`dcode -v` and `dcode --version` now warn when the fresh local update cache knows about a newer release. The check stays offline, honors update-check opt-outs, and fails softly when cached status is unavailable. **Before** ```text deepagents-code 0.1.61 deepagents (SDK) 0.7.8 ``` **After (when a cached update is known)** ```text deepagents-code 0.1.61 deepagents (SDK) 0.7.8 Update available: v0.1.62. Run: uv tool install -U deepagents-code ``` --- The warning uses the existing fresh local update cache and install-method-aware upgrade command, so version output does not make a network request. Made by [Open SWE](https://openswe.vercel.app/agents/b0010396-c78a-554c-a946-99194751d0aa) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
71552532bb |
release(deepagents): 0.7.9 (#5754)
> [!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`. Publish reads the merged CHANGELOG via `release.yml`, not this PR description — keep them aligned anyway so the PR stays an accurate historical record for reviewers and anyone returning later._ --- ## [0.7.9](https://github.com/langchain-ai/deepagents/compare/deepagents==0.7.8...deepagents==0.7.9) (2026-08-25) ### Features - Disabled tracing inputs on middleware. ([#5377](https://github.com/langchain-ai/deepagents/issues/5377)) ### Bug fixes - Exclude tools from execution when `excluded_tools` is set in harness profiles. ([#5809](https://github.com/langchain-ai/deepagents/issues/5809)) - Enforce full criterion coverage in `RubricMiddleware`. ([#5234](https://github.com/langchain-ai/deepagents/issues/5234)) - Clarified zero execute-timeout semantics. ([#5752](https://github.com/langchain-ai/deepagents/issues/5752)) _End release notes preview._ --- > [!NOTE] > A **community contributors** list and a **Special thanks** section (crediting the users who filed the issues this release's PRs closed) are 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 3). --------- 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> |
||
|
|
39b760f124 |
perf(code): omit middleware trace inputs (#5815)
Coding-agent middleware spans no longer serialize duplicate message and state payloads. --- This extends the SDK trace policy from #5377 to all middleware owned by `deepagents-code`, while avoiding a process-wide policy that could change third-party middleware tracing. A contract test keeps every owned middleware class opted in. Made by [Open SWE](https://openswe.vercel.app/agents/a391e2dc-ba5f-53fb-82fe-ad847a895937) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
299ee3283e |
hotfix(code): keep Textual output visible with stderr guard (#5814)
Keep the macOS Textual interface visible while filtering unmanaged native diagnostics. --- `TerminalStderrGuard` points fd 2 at `/dev/null`. Textual 8.2.8 renders every Unix frame to `sys.__stderr__`. #5813 therefore sent the whole interface to `/dev/null`: ``` $ deepagents # macOS, stdout and stderr on the same terminal # (blank screen, no prompt, no error) ``` When suppression is active, Textual now renders through the matching stdout terminal instead. Native fd-2 writes stay suppressed, and redirected stderr and terminal handoffs stay preserved: ``` $ deepagents # macOS, stdout and stderr on the same terminal ╭─ deepagents ─────────────────────────────────────────╮ │ > │ ╰──────────────────────────────────────────────────────╯ ``` ## When stdout cannot carry the interface The override applies only when it is safe. `stdout_driver_class()` declines, and the caller then drops stderr suppression, in two cases: - `sys.__stdout__` is `None` or closed. An active guard proves only that fd 1 is a terminal, not that the Python object is usable. Frames written to a dead stream kill Textual's writer thread, and the event loop then blocks forever on the full write queue. - `TEXTUAL_DRIVER` names an explicit driver. That driver renders to stderr, so the guard would hide it. The user's choice wins. In both cases the interface stays visible on an unguarded stderr. A visible interface with native noise beats an invisible one. ## Coupling to Textual internals The subclass replaces the private `_file` attribute, so it follows the rule the patches in `_textual_patches.py` follow: do not guess when the ground shifts. If Textual stops keeping its output stream in `_file`, the subclass raises instead of assigning a dead attribute. The error surfaces after the caller's `finally` restores fd 2, so it reaches the terminal. The test asserts the upstream contract as well as the override, so a rename in Textual fails in CI rather than in a user's terminal. Made by [Open SWE](https://openswe.vercel.app/agents/35f98f77-db79-5fa8-bf6b-12877813719d) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
442933da66 |
fix(code): ensure rubric coverage (#5369)
Stacked on #5234. Review that one first; this PR's diff is only the `libs/code` half. ## The bug `ReliableRubricMiddleware` overrides `_grade`/`_agrade` to retry a transient grader transport failure. Those are the same methods that hold the SDK's coverage retry, and the override never calls `super()`, so dcode replaced the coverage retry rather than composing with it. The consequence is asymmetric, because the *downgrade* that the coverage retry protects is in `_finalize_evaluation`, which dcode does inherit: | | grader calls before downgrade | |---|---| | SDK `RubricMiddleware` | 2 (under-report, re-ask, still short) | | dcode `ReliableRubricMiddleware` | 1 (under-report) | So a grader that miscounts its criteria once turns a `satisfied` into `needs_revision` in dcode with no second chance. At `max_iterations=3` a slip on the final iteration becomes `max_iterations_reached`, and `_resolve_pending_goal_completion` then refuses to complete a `/goal` whose work was actually satisfied. Second, smaller bug: on that downgrade path no criterion is marked failed, so the transcript rendered "Acceptance criteria not yet satisfied" plus "Address every unmet criterion, then retry the check." above an empty list. ## The fix - The transport retry moves down to `_invoke_grader`/`_ainvoke_grader`, which wrap exactly one grader call and delegate to `super()`. The two retries now nest correctly: a transport fault is retried within a call, an under-report across calls. - `_grader_input` takes the SDK's `correction` argument and builds its payload through `super()`, so the retry's corrective feedback reaches the grader and the delimiter sanitization is no longer re-implemented here. - The `after_agent`/`aafter_agent` overrides are deleted. They existed only to re-raise `GraphBubbleUp` and to thread `runtime.context`; the SDK does both now. This also drops the private `_strategy_from_result` import. - `_format_rubric_event`/`_format_rubric_details` read the new `unverified` flag and describe the verdict as a verification gap ("could not be verified", "the grader could not account for every criterion") instead of pointing at criteria that do not exist. ## Tests `libs/code`: 11680 passed, 3 skipped. `make lint` and `make type` clean. New coverage: - the coverage retry fires for an under-reporting grader, sync and async, and the second call carries the correction - a transport fault and an under-report in the same pass produce three grader calls - `unverified` rendering for `needs_revision` and `max_iterations_reached`, plus a guard that the ordinary revision wording is unchanged --------- Co-authored-by: Mason Daugherty <github@mdrxy.com> |
||
|
|
a4d9b8aa7d |
fix(code): protect TUI from native stderr writes (#5813)
Native macOS diagnostics no longer corrupt the Textual interface while it owns the terminal. --- macOS frameworks can write directly to fd 2, bypassing Textual's Python-level stderr capture. Suppress those writes only when stdout and stderr share a TTY, while preserving redirected stderr and restoring it for external editors, process suspension, and teardown. Tests cover fd suppression/restoration, platform and TTY gates, editor suspension, and app cleanup. Made by [Open SWE](https://openswe.vercel.app/agents/35f98f77-db79-5fa8-bf6b-12877813719d) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
de60958a7d |
feat(code): default the stale editable-deps prompt to Refresh environment now (#5810)
The stale editable-dependency prompt shown before the TUI launches now defaults to "Refresh environment now" instead of "Abort launch": a bare Enter (or clicking through with the default highlight) repairs the environment rather than killing the launch. "Abort launch" keeps its leading position in the list, one keystroke up from the new default. --- When an editable `dcode` install falls behind the checkout's dependency floors, the prompt's whole purpose is to steer the user toward refreshing — yet it opened with "Abort launch" highlighted, so the path of least resistance was the least useful outcome and users could reflexively Enter their way out of a launch they wanted. In the text fallback the prompt advertised `Abort launch [N]` as the default, so a bare Enter aborted there too. The picker now computes its initial highlight by action identity and prefers the refresh action when one is offered; deny-only prompts (project trust, MCP approvals) still default to refusing. The text fallback mirrors the picker: hints read `Abort launch [n] · Refresh environment now [U]` and an empty answer maps to `REFRESH`, while explicit `n`/`no` still aborts. |
||
|
|
3706960e71 |
refactor(code): remove redundant HITL rejection framing (#5658)
Depends on https://github.com/langchain-ai/langchain/pull/39773 --- Removes dcode's client-side rejection-reason prefix so `HumanInTheLoopMiddleware` owns the model-facing framing while dcode continues to transport and render the raw reason. This must not ship until the upstream change is released and dcode's LangChain minimum is updated to that release; otherwise older LangChain versions would receive an unframed reason. Made by [Open SWE](https://openswe.vercel.app/agents/3df8f29d-d7d4-5296-9369-26755096058d) --------- Co-authored-by: Harrison Chase <11986836+hwchase17@users.noreply.github.com> Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> Co-authored-by: Mason Daugherty <mason@langchain.dev> |
||
|
|
88092269b6 |
chore(deps): raise dependency minimums for deepagents-code (#5807)
Raises the LangChain-ecosystem dependency lower bounds (`langchain*`, `langgraph*`, `langsmith*`, `deepagents*`) for `deepagents-code` to the latest compatible stable PyPI release, and regenerates every affected `uv.lock`. Upper bounds, extras, and markers are preserved; exact `==` pins are left alone. Raised 1 minimum(s): | Manifest | Dependency | Change | |---|---|---| | `libs/code/pyproject.toml` | `langchain` | `langchain>=1.3.16,<2.0.0` → `langchain>=1.3.17,<2.0.0` | Opened automatically by `raise_langchain_minimums.yml`. Review the raised bounds against any compatibility notes in the manifest comments before merging. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
29cd02ae17 |
chore(deps): raise dependency minimums for deepagents (#5805)
Raises the LangChain-ecosystem dependency lower bounds (`langchain*`, `langgraph*`, `langsmith*`, `deepagents*`) for `deepagents` to the latest compatible stable PyPI release, and regenerates every affected `uv.lock`. Upper bounds, extras, and markers are preserved; exact `==` pins are left alone. Raised 1 minimum(s): | Manifest | Dependency | Change | |---|---|---| | `libs/deepagents/pyproject.toml` | `langchain` | `langchain>=1.3.16,<2.0.0` → `langchain>=1.3.17,<2.0.0` | Opened automatically by `raise_langchain_minimums.yml`. Review the raised bounds against any compatibility notes in the manifest comments before merging. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
da67c86e52 |
chore(repo): remove deprecated libs/cli package (#5791)
`deepagents-cli` was deprecated in #5780 in favor of `managed-deepagents` (`mda`), and 0.3.0 (#5782) was its final release. The package has been warning at import time since; this PR deletes the source tree and unwinds it from repo infrastructure. What changes: - Deletes `libs/cli/` (source, tests, lockfile, docs). - Removes `libs/cli` from `release-please-config.json` / `.release-please-manifest.json` and from the release detection/dispatch logic in `release-please.yml` and `release.yml`, so release-please stops managing the package. - Removes the `cli`/`deepagents-cli` scopes from PR title lint, branch-name check (workflow + `.githooks/pre-push`), the PR labeler config and scope-rename aliases, the `cli` file rules, CI change filters, lint/test jobs, integration-test options, dependabot, pre-commit hooks, CODEOWNERS, and the bug-report template. - Updates docs (`AGENTS.md`, `libs/README.md`, `libs/DEVELOPMENT.md`, `RELEASING.md`, threat models, openwiki briefs) and release-infra script tests that used `libs/cli` as a fixture (swapped to `libs/acp` / `libs/evals` equivalents). Intentionally left in place: - `examples/ralph_mode/` still imports `deepagents_cli` — tracked separately; the example needs migration onto `libs/code`'s non-interactive runner. - Historical references: the `libs/code/CHANGELOG.md` fork note, and the `SNAPSHOT_NAME = "deepagents-cli"` constant in the LangSmith sandbox integration test (it names a live LangSmith snapshot, not the deleted package). - `CLI_MAX_RETRIES_KEY = "__deepagents_cli_max_retries__"` in `libs/code` — a live internal carrier key; renaming is out of scope. Published `deepagents-cli` releases on PyPI are unaffected; the repo simply stops cutting new ones. --------- Signed-off-by: Mason Daugherty <github@mdrxy.com> |
||
|
|
a103a88f8a |
feat(code): show Escape hint in model picker (#5775)
The `/model` picker footer now shows `Esc close` so its dismissal shortcut is discoverable. --- The hint is limited to the standard picker; curated onboarding remains compact. Focused selector tests cover both variants.  Made by [Open SWE](https://openswe.vercel.app/agents/383433e3-6793-5759-871b-b676e46a00a3) Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
23a80f4d8e |
release(deepagents-code): 0.1.61 (#5758)
> [!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`. Publish reads the merged CHANGELOG via `release.yml`, not this PR description — keep them aligned anyway so the PR stays an accurate historical record for reviewers and anyone returning later._ --- ## [0.1.61](https://github.com/langchain-ai/deepagents/compare/deepagents-code==0.1.60...deepagents-code==0.1.61) (2026-08-24) ### Features - Added `google_anthropic_vertex` provider support for Claude on Vertex AI ([#5760](https://github.com/langchain-ai/deepagents/issues/5760)). - Enforced configured model allowlists ([#5649](https://github.com/langchain-ai/deepagents/issues/5649)). - Injected goal and rubric context directly, replacing `get_goal` and `get_rubric` ([#5041](https://github.com/langchain-ai/deepagents/issues/5041)). - Made `/offload` server-owned ([#5261](https://github.com/langchain-ai/deepagents/issues/5261)). - Added prompt clipboard support ([#5733](https://github.com/langchain-ai/deepagents/issues/5733)). - Show Auto approval review progress ([#5729](https://github.com/langchain-ai/deepagents/issues/5729)). ### Bug Fixes - Kept long thread resumes responsive ([#5772](https://github.com/langchain-ai/deepagents/issues/5772)). - Render first streamed text immediately ([#5761](https://github.com/langchain-ai/deepagents/issues/5761)). - Show the incognito shell command widget ([#5768](https://github.com/langchain-ai/deepagents/issues/5768)). - Only highlight actionable tool rows ([#5769](https://github.com/langchain-ai/deepagents/issues/5769)). - Warn and ignore `--auto-approve` and `--yolo` in headless mode ([#5750](https://github.com/langchain-ai/deepagents/issues/5750)). - Sweep expired history archives at startup ([#5751](https://github.com/langchain-ai/deepagents/issues/5751)). - Clarified auth environment setup ([#5767](https://github.com/langchain-ai/deepagents/issues/5767)). _End release notes preview._ --- > [!NOTE] > A **community contributors** list and a **Special thanks** section (crediting the users who filed the issues this release's PRs closed) are 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 3). --------- 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> |
||
|
|
b494f43437 |
feat(code): make /offload server-owned (#5261)
`/offload` now runs only as a server-owned operation on built-in dcode
servers. Local and ACP agents no longer support it, and custom or older
servers without the route are unsupported.
---
The graph-operation prototype coupled the TUI to LangGraph run routing
and lifecycle behavior. This revision puts the ownership boundary in
dcode's server backend: the built-in LangGraph deployment registers a
custom HTTP app that resolves the same cached runtime, compaction
policy, hooks, model configuration, and `CompositeBackend` as the
interactive agent.
```mermaid
flowchart LR
user["User runs /offload"] --> tui["TUI"]
subgraph client["Client"]
tui --> remote["RemoteAgent"]
hookexec["Configured hook executor"]
remote <--> hookexec
end
subgraph server["Built-in dcode LangGraph server"]
api["Offload HTTP boundary"]
runtime["Shared server runtime"]
operation["OffloadOperation"]
hooks["PreCompact + PreToolUse"]
compact["Agent compaction service"]
state[("Thread checkpoint")]
backend["Agent CompositeBackend"]
cost["Cost recorder"]
api -->|"resolve"| runtime
runtime --> operation
operation --> hooks --> compact
api -->|"read + validate"| state
compact -->|"plan archive"| backend
cost -->|"priced delta"| api
api -->|"summary event + cost"| state
api -->|"then append archive"| backend
end
remote -->|"thread ID + runtime context"| api
api -->|"typed result or hook request"| remote
compact -->|"summarize"| model["Configured model provider"]
style api fill:#dcfce7,stroke:#16a34a
style operation fill:#dcfce7,stroke:#16a34a
style state fill:#dcfce7,stroke:#16a34a
```
The server operation:
- reads and hydrates checkpoint state itself; the request contains no
graph name, checkpoint, or conversation messages;
- refuses a thread that holds work in flight — active, interrupted,
carrying pending graph tasks, or advanced past the checkpoint it read. A
thread whose last run *failed* is still offloadable: LangGraph leaves
that thread on `error` until the next run completes, which is exactly
when a user reaches for `/offload` to recover from an overflow;
- commits only the channels `OffloadStateUpdate` declares. The runtime
guard is an allowlist derived from that type, so a future merge adding
any other channel is refused, not just `messages`. No synthetic
assistant or tool message is persisted, and the operation cannot replace
conversation history;
- resolves the summarizer's model and transport from the checkpoint, not
from the request. A client cannot point the server's credentialed
provider calls at an endpoint of its choosing;
- runs the agent's `PreCompact` and `PreToolUse` hooks, transporting
interrupt/resume payloads opaquely through the client and returning
denials as typed results. The session's approval mode is carried across,
so a configured hook sees the same mode it sees on an interactive turn;
- reserves the summary in the checkpoint *before* appending the archive,
and rolls the append back if the link cannot be committed. A per-session
lock serializes an archive's read/write cycle against concurrent
compactions;
- records priceable model cost in the same checkpoint update. Every
prepared charge is explicitly committed or rolled back, and an abandoned
one warns rather than vanishing;
- uses the agent's existing compaction backend/policy and archive guard,
so server-side archives remain readable by the agent;
- accepts an explicit cancellation for an in-flight operation and
confirms the outcome, so a client that gives up learns whether the
operation finished or was cancelled.
The client calls the server route directly. There is no capability probe
and no seeded tool-call fallback. A local in-process or ACP agent gets a
short unsupported message. A server that does not register the route
gets a message naming that cause instead of a bare transport error.
Careful review is warranted around the custom-route/thread-state
boundary, the archive reserve-then-append ordering, and hook replay
identity. The real integration test launches the production server
configuration, checks message preservation around `/offload`, verifies
route authentication, and reads the archive back through the running
agent.
### User-visible output
Success is unchanged in shape:
```
Offloaded 6 older messages, freeing up context window space.
Conversation: ~1.0K → ~250 tokens (75% decrease), 4 messages kept.
```
Three failure paths now say something actionable:
| Situation | Before | Now |
| --- | --- | --- |
| Last turn failed (thread on `error`) | `Offload failed: Cannot offload
while the thread has an active or interrupted run.` — and no way out
until a turn succeeds | Offloads normally |
| Server does not register the route | `Offload failed: 404 Not Found` |
`Offload failed: This server does not provide dcode's /offload
operation. Use the built-in dcode server, or upgrade the server to a
version that registers it.` |
| Reporting fails after the server committed | `Offload failed:
<exception>` — prompting a second offload of an already compacted
conversation | `The conversation was offloaded, but the result could not
be displayed. Check logs for details.` |
A dropped endpoint override is now logged with the key names, so a user
whose gateway configuration is being ignored has something to find.
<details>
<summary>Test plan</summary>
- Full `make test`: 14,199 passed, 2 skipped.
- Real-server integration: 3 passed.
- `make format` and `make lint`: passed, including Ruff, `ty`, and
command-catalog validation.
- Three added tests were mutation-verified: re-keying the per-thread
lock on `operation_id`, renaming the route's path converter, and
deleting the hook round-limit `break` each fail the new test and passed
before it.
</details>
Made by [Open
SWE](https://openswe.vercel.app/agents/0ecc91e2-f151-5f52-94aa-e6ed75c6dfc1)
---------
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
|
||
|
|
85e1e5b130 |
fix(code): keep long thread resumes responsive (#5772)
Long thread resumes now paint sooner and keep the Resuming indicator visible until restoration finishes. --- This reduces the initial synchronous transcript window from 100 to 30 messages and moves checkpoint deserialization plus hook transcript projection off the UI thread; existing bounded hydration continues after first paint. Made by [Open SWE](https://openswe.vercel.app/agents/f616e1f9-6605-0bd2-02c6-7f46ef67c6f2) ## References - Plan: https://openswe.vercel.app/agents/f616e1f9-6605-0bd2-02c6-7f46ef67c6f2/plan --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
b78413c708 |
fix(code): only highlight actionable tool rows (#5769)
Fixed misleading hover feedback on non-expandable tool results in the terminal UI. --- Tool rows now expose the hover gutter only when clicking can expand or collapse hidden detail. Fully visible results ignore row clicks, while expandable output, arguments, and task descriptions retain their affordance. Made by [Open SWE](https://openswe.vercel.app/agents/7d257f30-8a87-5613-9143-5d5effa4b19c) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
d9dc96ed55 |
fix(code): sweep expired history archives at startup (#5751)
Conversation-history archives older than 30 days are now removed by a best-effort startup worker; `[history].retention_days` overrides the window and `0` disables cleanup. --- The sweep is restricted to regular `.md` files directly under the archive directory, logs and swallows filesystem/config failures, and never blocks startup. Made by [Open SWE](https://openswe.vercel.app/agents/cd8f03c0-256c-5cb1-86f2-e0897df89b24) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
dd8b8ad84a |
feat(code): enforce configured model allowlists (#5649)
`dcode` can now be restricted to an approved set of models. Add a `models.allowed` list to `config.toml` (or push it via managed config) and every model the app tries to use — the launch default, `--model` flag, `/model` selections, saved defaults, and subagent model declarations — is checked against it. Entries are exact `provider:model` specs or `provider:*` wildcards that admit a whole provider's lineup. Unset means all models are allowed; an empty list means none are. --- **Why:** organizations rolling out `dcode` need to guarantee agents only run on approved models (cost, compliance, data routing). Previously any model with a credential was usable, and there was no enforcement point. **How:** - A new `models.allowed` config key (user or managed layer) parses into an ordered, deduplicated allowlist of exact `provider:model` specs and `provider:*` wildcards. A malformed list fails closed (deny-all) with an error naming the defect, so a typo can't silently disable the guardrail. - Every model-resolution path is gated: CLI flags, the model selector (blocked entries are hidden from recommendations; typing a blocked spec explains the policy and lists what's allowed), saved defaults (a blocked stored default is ignored with a log, not advertised as `(default)`), and subagent declarations (the error names the declaring file). - Bare model names are canonicalized the same way `create_model` resolves them before the policy check, so `gpt-5.6-terra` matches `openai:gpt-5.6-terra` — or an `openai:*` wildcard — instead of being spuriously rejected; a name whose provider can't be established stays unmatchable, so inference is never a bypass. - A `provider:*` wildcard admits that provider's whole lineup where an exact list would prune unlisted models. The wildcard names no model itself, so default resolution expands it to the provider's discovered models — the registry profile lineup merged with any configured list — rather than selecting it literally; a wildcard for a provider with no discovered or configured models fails closed with a "no discoverable models" message instead of a phantom credential prompt. - Blocked selections raise `ModelNotAllowedError`, whose message names the policy layer (user file vs. administrator-managed), quotes the offending spec, and lists the allowed entries — instead of the previous generic I/O-style failure. When the allowlist is active but no allowed model has credentials, a distinct `NoAllowedModelCredentialsError` keeps `/auth` from accepting a key and appearing to do nothing. Edge cases covered: remote no-auth providers (e.g., a LAN Ollama endpoint) remain valid allowlist fallback candidates; bare Bedrock IDs must be written `bedrock:<id>` in the list since they otherwise split at the version colon and could never match; `dcode tools list` skips enforcement because it only compiles graphs it never invokes. --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> Co-authored-by: Kimi K3 <kimi-k3@moonshot.ai> |
||
|
|
a095af93cf |
fix(code): clarify auth environment setup (#5767)
Environment-variable guidance in the auth dialog is now shorter and identifies both supported `.env` locations plus the exact scope of `Ctrl+R`. --- The previous copy was verbose and made the reload shortcut sound global rather than dialog-specific. **Before** > Alternatively, environment variables can be used in place of the key stored above. Set `DEEPAGENTS_CODE_TAVILY_API_KEY` for a dcode-only key; it has the highest priority. Set `TAVILY_API_KEY` to share a key with other provider SDK tools; it is used only when no scoped or stored key exists. After setting one in a .env file, press Ctrl+R to reload without restarting. A variable exported in a separate shell after launch is invisible to this process; it needs a full relaunch. Configuration docs. **After** > Environment variables: `DEEPAGENTS_CODE_TAVILY_API_KEY` (dcode only, highest priority) or `TAVILY_API_KEY` (shared, lowest priority). Put either in the project `.env` or `~/.deepagents/.env`; press Ctrl+R in this dialog to reload. New shell exports require restarting the app. Configuration docs. **Example scenario:** A user has the Tavily auth dialog open and adds `DEEPAGENTS_CODE_TAVILY_API_KEY` to the project `.env`. They can press `Ctrl+R` in that dialog to load it immediately. If they instead export the variable from another shell, they must restart dcode because the running process cannot inherit later shell changes. Focused auth-widget tests cover precedence, dotenv locations, reload scope, and restart guidance. Made by [Open SWE](https://openswe.vercel.app/agents/3e770dd7-d5a5-5aa2-b7e7-5fd34e54f359) --------- Signed-off-by: Mason Daugherty <github@mdrxy.com> Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> Co-authored-by: open-swe[bot] <215916821+open-swe[bot]@users.noreply.github.com> |
||
|
|
a564f8eead |
refactor(code): remove legacy resolve_scalar config path (#5755)
`ConfigResolver` (with its cached per-process snapshot) shipped in #5736, but every production reader still went through the legacy `resolve_scalar` / `resolve_ranked_scalar` wrappers, which re-parse `config.toml` on every call. This PR retires those wrappers and settles the question the wrappers had been hiding: **when is configuration read?** ## Behavior change Configuration files are now read once into a single process-wide generation. Every reader resolves against that generation, so no two parts of the process can disagree about a setting. **Editing `config.toml` while the app is running therefore has no effect until the generation advances**, which happens in exactly two places: an in-app write (toggling a preference refreshes the generation itself) and `/reload`. A file that fails to parse leaves the previous generation in force rather than half-applying the new one. This is the convention every long-running Unix service uses — read at start, change on an explicit signal. Watching files for edits is deliberately not done: a partly applied configuration is a worse failure than a stale one, and per-option exceptions (some live, some cached) would make the effective configuration unpredictable per setting. The policy is now written down in `ARCHITECTURE.md` and pinned by tests, so it stops being an accident of which call path a reader happens to take. Users who edit the file by hand and expect immediate effect will need `/reload`. Worth a release note. ## Retiring the wrappers 1. **Plain single-key readers move to the shared resolver.** `app.py`, `config.py`, `cold_cache.py`, `cost_tracking.py`, `main.py`, `plugins/discovery.py`, and the two TUI widgets now call `get_config_resolver().get(option)`, replacing per-call file parsing with the resolver's cached snapshot. Diagnostics behavior is preserved by calling `_emit_ranked_diagnostics(option, resolved)` explicitly at each site. `Settings._reload_values` resolves through `get_config_resolver(refresh_managed=refresh_managed)`, so `/reload` and later readers observe the same generation instead of the cache going stale; the env tier still comes from the method's `env` argument, and the "a failed or blocked reload never drops policy in force" invariant is unchanged. 2. **Explicit-snapshot callers build ad-hoc resolvers.** Callers that pass `toml_data=`/`managed_toml_data=` deliberately inspect a specific file generation rather than process state, so pointing them at the shared cache would be wrong. The decision rule: if the caller snapshots one generation itself — the `config` CLI (one read per invocation), `update_check` (health reported next to the value), the sandbox/theme loaders (a non-default `config_path` excludes managed policy), and the managed-policy validators (a candidate generation not yet in force) — it builds `resolver_from_snapshots(TomlSnapshot(...), TomlSnapshot(...))` and calls `.get(option)`. 3. **The legacy path is deleted.** `resolve_scalar`, `resolve_ranked_scalar`, and the now-dead `_coerce_env` helper are gone from `config_manifest`. The manifest's remaining bespoke readers share a private `_resolve_option`, which resolves through the shared generation when the caller supplies no tables. The migration-parity equivalence test is deleted with them — its job (proving the two paths agree) is done. Tests that drove the wrappers directly now exercise the same coercion, precedence, and diagnostics assertions through `ConfigResolver`/`resolver_from_snapshots` or real TOML files under the test-redirected config path. 4. **The remaining fresh-parse readers, and why.** Two keep a concrete parse, and neither is on a live path: - `resolve_read_project_dotenv` runs during dotenv bootstrap, before the project `.env` is layered into `os.environ`; seeding the shared generation there would capture an env tier later readers do not see. - `resolve_startup_mode_with_source` inspects the raw user table on its fall-through path, which the resolver does not expose. Its only production caller (`dcode config`) passes an explicit generation. ## Fixes found while reviewing this branch - **`/reload` previews read a stale user tier.** The preview path shares `_reload_values` with `refresh_managed=False`, so its cached user snapshot could predate the `[shell].allow_list` edit being previewed. The preview then reported no change while the accepted reload applied it — diverging on a security-sensitive auto-approval setting, and reaching the cwd-switch consent prompt as `project_settings_change_detected=False`. The preview now reads the user file fresh while keeping the managed snapshot the process is enforcing (a preview must not refresh policy in force). This is the atomic-swap half of the policy, not a liveness exception: preview and apply must agree on one generation. - **A lost diagnostic on UI preference writes.** `_save_ui_bool_result` was the one migrated reader that did not pick up the wrapper's implicit diagnostics call, so a malformed managed `[ui]` entry was reported nowhere — removing the one signal an administrator has that their policy is inert. - **`/reload` reloaded every provider twice.** `get_config_resolver(refresh_managed=True)` already reloads on a cache hit, so the explicit `.reload()` was redundant: one `/reload` read the managed file four times and re-ran `managed_policy_violations` with each. - **Merge strategies for real manifest options were unasserted.** The deleted `test_populated_tiers_actually_reach_the_resolver` did not depend on the `resolve_scalar` oracle, and `merge_strategy` appeared nowhere else in the suite — so flipping `threads.columns` from `DEEP_MERGE` to `REPLACE`, or `mcp.disabled_servers` from `UNION` to `REPLACE`, passed the full suite. Restored and mutation-checked in both directions. - **`refresh_managed` was untested.** Removing the refresh from `/reload` kept the suite green, because the existing reload tests drive env rather than a file edit and monkeypatch `DEFAULT_CONFIG_PATH` (which changes the resolver cache key and rebuilds a fresh resolver, hiding staleness). Now pinned in both directions. - **Comment rot.** Roughly ten comments still described per-call file parsing, including one that promised live edits took effect without a restart — the exact behavior the migration removed. `get_option`, `get_config_options`, `_emit_ranked_diagnostics`, and the manifest types stay public and unchanged; managed config remains read-only; no new dependencies. ## Follow-ups - `_emit_ranked_diagnostics` and `_ranked_source` now have nine external importers, and the snapshot-construction block appears at six production sites. A small `resolve_for_display(option)` seam (get + emit + label) would restore the encapsulation the wrapper provided and make the missing-emit bug above structurally impossible. - A file corrupted *after* its generation is taken is not reported. Corruption present when the file is read still logs with exact line and column; only mid-session corruption is silent. A cheap mtime/size check on `/reload` would close it. - Five `cast(...)` calls exist only because `ConfigResolver.get` returns `ResolvedValue[object]`; three sit behind validating predicates that could be `TypeGuard`s. `AGENTS.md` treats `cast` as a last resort. |
||
|
|
9bef676fe6 |
fix(code): show incognito shell command widget (#5768)
Incognito shell commands now show the same transcript widget as regular shell commands, using the existing incognito color while remaining excluded from model context. --- This preserves the `!!` prefix when mounting `UserMessage`, allowing the shared shell widget’s existing mode detection and styling to apply. Made by [Open SWE](https://openswe.vercel.app/agents/5d95e03a-8235-5a88-bcb2-8974878a4ffa) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
f6b06110d8 |
style(code): align execute output details (#5770)
Execute output prefixes now align beneath the tool name, and elapsed time appears below command output. --- The output row gains the missing header-prefix inset, while timed status rows move after output only when completed. Focused widget tests cover both positions. **Before** <img width="604" alt="Execute widget before alignment fix" src="https://01a03412-974b-7c1f-aa7a-73b8dff20c79--dl.smithbox.dev/ZXlKaGJHY2lPaUpGWkVSVFFTSXNJbXRwWkNJNklrVmpWRFZxTVd3MmNIQXhlVFZJU3pCQ2VtSjBhMjFTTlc1SmJuTklVVTFqYWpKVVNVUk5kMmgzVURRaUxDSjBlWEFpT2lKS1YxUWlmUS5leUpoZFdRaU9sc2ljMkZ1WkdKdmVDMWtiM2R1Ykc5aFpDSmRMQ0pwWVhRaU9qRTNPRGMxT0RFeE1UY3NJbXAwYVNJNklqQXhZVEF6TkRJekxUTXpaV0l0TjJJM1l5MDVaalZrTFdJM05qVmtNREZrWWpVM1lTSXNJbk5wWkNJNklqQXhZVEF6TkRFeUxUazNOR0l0TjJNeFppMWhZVGRoTFRjellqaGtabVl5TUdNM09TSXNJblJwWkNJNkltVmlZbUZtTW1WaUxUYzJPV0l0TkRVd05TMWhZMkV5TFdReE1XUmxNVEF6TnpKaE5DSXNJbkJoZEdnaU9pSXZkRzF3TDJWNFpXTjFkR1V0ZDJsa1oyVjBMV0psWm05eVpTNXpkbWNpTENKamRDSTZJbWx0WVdkbEwzTjJaeXQ0Yld3aUxDSmpaQ0k2SW1sdWJHbHVaU0o5LnpGWWVFT2xNZjJpWXc3djUxRTl4ekU2Q0lCaHR1VXFCMkI5dWpVS0w3UkRLUzN0TUFINlFlZzZhUWlibVVjZm94R04waXRsQXp4cGV4NXAyOHZ4UEN3"> **After** <img width="604" alt="Execute widget showing aligned output and elapsed time" src="https://01a03412-974b-7c1f-aa7a-73b8dff20c79--dl.smithbox.dev/ZXlKaGJHY2lPaUpGWkVSVFFTSXNJbXRwWkNJNklrVmpWRFZxTVd3MmNIQXhlVFZJU3pCQ2VtSjBhMjFTTlc1SmJuTklVVTFqYWpKVVNVUk5kMmgzVURRaUxDSjBlWEFpT2lKS1YxUWlmUS5leUpoZFdRaU9sc2ljMkZ1WkdKdmVDMWtiM2R1Ykc5aFpDSmRMQ0pwWVhRaU9qRTNPRGMxT0RBNU5UZ3NJbXAwYVNJNklqQXhZVEF6TkRJd0xXTTRPV010TnpZd09DMWlOR05sTFdaaFpUbGxaVEpoWmpnMk1TSXNJbk5wWkNJNklqQXhZVEF6TkRFeUxUazNOR0l0TjJNeFppMWhZVGRoTFRjellqaGtabVl5TUdNM09TSXNJblJwWkNJNkltVmlZbUZtTW1WaUxUYzJPV0l0TkRVd05TMWhZMkV5TFdReE1XUmxNVEF6TnpKaE5DSXNJbkJoZEdnaU9pSXZkRzF3TDJWNFpXTjFkR1V0ZDJsa1oyVjBMbk4yWnlJc0ltTjBJam9pYVcxaFoyVXZjM1puSzNodGJDSXNJbU5rSWpvaWFXNXNhVzVsSW4wLjh6YU1xU2lJbWpjRGV0cFVWa3Z5THlFZ0YzZUtaVGtzVkdMY1FDQWE1bDVsZWZaemlBNUZMek5pNXNNQm5GNkxLSFh3NEJsaDFKUnF6ODJMVjM2eEF3"> Made by [Open SWE](https://openswe.vercel.app/agents/f2a4ef6d-3823-522b-8381-15666275dcbc) Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
c2f44ffd27 |
feat(code): prompt clipboard (#5733)
Adds a searchable prompt clipboard for reusing previously submitted prompts, with a two-tier Ctrl+R interaction modeled on codex and Claude Code. The first <kbd>Ctrl</kbd>+<kbd>R</kbd> opens an inline search panel directly above the prompt input — a query field, up to five newest-first matches, and a hint line — so recalling a recent prompt never leaves the composer. Focus and the blinking cursor move into the query field while the panel is open; typing filters matches case-insensitively while the draft stays frozen underneath. <kbd>Enter</kbd> inserts the selected prompt at the cursor, arrow keys navigate, <kbd>Tab</kbd>/<kbd>Shift</kbd>+<kbd>Tab</kbd> page by five rows, and <kbd>Esc</kbd> (or Backspace on an empty query) restores the draft and cursor exactly as they were. Pressing <kbd>Ctrl</kbd>+<kbd>R</kbd> again while the panel is open escalates to the full-screen prompt clipboard, carrying the typed query into its filter. The full view adds a scrollable list, a multi-line preview pane, the same <kbd>Tab</kbd>/<kbd>Shift</kbd>+<kbd>Tab</kbd> paging, and <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy a prompt without inserting it. `/prompts` opens this full view directly, as does Ctrl+R while autocomplete is open. --- Prompt history is local-only: it reads the shared JSONL history file, deduplicates newest-first, and refreshes on open, with no telemetry or sync. Both tiers insert through the undoable edit path, so a recalled prompt can be undone with <kbd>Ctrl</kbd>+<kbd>Z</kbd> like any other edit. --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|
|
75095bb81d |
chore(deps): raise dependency minimums for all (#5764)
Raises the LangChain-ecosystem dependency lower bounds (`langchain*`, `langgraph*`, `langsmith*`, `deepagents*`) for `all` to the latest compatible stable PyPI release, and regenerates every affected `uv.lock`. Upper bounds, extras, and markers are preserved; exact `==` pins are left alone. Raised 17 minimum(s): | Manifest | Dependency | Change | |---|---|---| | `libs/acp/pyproject.toml` | `langchain-openai` | `langchain-openai>=1.3.4` → `langchain-openai>=1.6.0` | | `libs/acp/pyproject.toml` | `langchain-baseten` | `langchain-baseten>=0.2.1` → `langchain-baseten>=0.2.3` | | `libs/cli/pyproject.toml` | `langchain` | `langchain>=1.3.12,<2.0.0` → `langchain>=1.3.16,<2.0.0` | | `libs/cli/pyproject.toml` | `langgraph-sdk` | `langgraph-sdk>=0.4.2,<1.0.0` → `langgraph-sdk>=0.4.3,<1.0.0` | | `libs/cli/pyproject.toml` | `langsmith` | `langsmith>=0.9.3` → `langsmith>=0.11.1` | | `libs/code/pyproject.toml` | `langgraph-runtime-inmem` | `langgraph-runtime-inmem>=0.32.6,<1.0.0` → `langgraph-runtime-inmem>=0.33.0,<1.0.0` | | `libs/code/pyproject.toml` | `langchain-google-genai` | `langchain-google-genai>=4.3.4,<5.0.0` → `langchain-google-genai>=4.3.5,<5.0.0` | | `libs/code/pyproject.toml` | `langchain-aws` | `langchain-aws>=1.7.2,<2.0.0` → `langchain-aws>=1.7.3,<2.0.0` | | `libs/code/pyproject.toml` | `langchain-fireworks` | `langchain-fireworks>=1.5.2,<2.0.0` → `langchain-fireworks>=1.6.0,<2.0.0` | | `libs/code/pyproject.toml` | `langchain-perplexity` | `langchain-perplexity>=1.4.0,<2.0.0` → `langchain-perplexity>=1.4.1,<2.0.0` | | `libs/deepagents/pyproject.toml` | `langchain-google-genai` | `langchain-google-genai>=4.3.4,<5.0.0` → `langchain-google-genai>=4.3.5,<5.0.0` | | `libs/deepagents/pyproject.toml` | `langchain-aws` | `langchain-aws>=1.7.2,<2.0.0` → `langchain-aws>=1.7.3,<2.0.0` | | `libs/partners/quickjs/pyproject.toml` | `langchain` | `langchain>=1.3.14,<2.0.0` → `langchain>=1.3.16,<2.0.0` | | `libs/partners/quickjs/pyproject.toml` | `langchain-core` | `langchain-core>=1.4.9,<2.0.0` → `langchain-core>=1.6.0,<2.0.0` | | `libs/partners/quickjs/pyproject.toml` | `langgraph` | `langgraph>=1.2.9,<2.0.0` → `langgraph>=1.2.11,<2.0.0` | | `libs/partners/quickjs/pyproject.toml` | `langgraph-checkpoint-postgres` | `langgraph-checkpoint-postgres>=3.1.1,<4.0.0` → `langgraph-checkpoint-postgres>=3.1.2,<4.0.0` | | `libs/talon/pyproject.toml` | `langchain-mcp-adapters` | `langchain-mcp-adapters>=0.3.0,<1.0.0` → `langchain-mcp-adapters>=0.3.2,<1.0.0` | Opened automatically by `raise_langchain_minimums.yml`. Review the raised bounds against any compatibility notes in the manifest comments before merging. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |