Skip to content

feat(code): tri-state DEEPAGENTS_CODE_ONBOARDING env var - #5301

Merged
Mason Daugherty (mdrxy) merged 2 commits into
mainfrom
mdrxy/code/onboarding-env-var
Aug 4, 2026
Merged

feat(code): tri-state DEEPAGENTS_CODE_ONBOARDING env var#5301
Mason Daugherty (mdrxy) merged 2 commits into
mainfrom
mdrxy/code/onboarding-env-var

Conversation

@mdrxy

Copy link
Copy Markdown
Member

DEEPAGENTS_CODE_DEBUG_ONBOARDING is now DEEPAGENTS_CODE_ONBOARDING, and it works in both directions: set it to a falsy value to skip the first-run onboarding flow entirely (useful for fresh containers, CI, and provisioned machines), a truthy value to force it open on every interactive startup, or leave it unset for the existing first-run behavior.


Previously the only knob was a debug-only override that could force onboarding on. There was no supported way to turn it off, so anyone provisioning a fresh instance had to pre-seed the internal completion marker file — an implementation detail that is not part of the documented surface.

should_run_onboarding now reads the variable through the existing classify_env_bool helper so it resolves three ways: truthy forces the flow, falsy suppresses it, and unset (or an unrecognized token, which is logged) defers to the completion marker as before. Suppressing the flow does not write the marker, so removing the variable restores first-run behavior rather than silently consuming it.

The config manifest entry moves from debug.onboarding to startup.onboarding and drops its static default, so config reports it as unset rather than implying a hardcoded false. It stays env-only, matching what the runtime actually reads.

The old variable name is removed rather than aliased: it was documented as a debug-only knob, and keeping a second spelling would leave two names with different semantics.

Made by Open SWE

The onboarding override was debug-only and could only force the flow on,
so a fresh instance (container image, CI, provisioned workstation) had no
way to opt out of the first-run tutorial without pre-seeding the internal
completion marker. Rename the variable and let a falsy value disable the
flow outright while an unset value keeps first-run behavior.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@github-actions github-actions Bot added dcode Related to `deepagents-code` feature New feature/enhancement or request for one internal User is a member of the `langchain-ai` GitHub organization size: S 50-199 LOC labels Aug 4, 2026
@mdrxy
Mason Daugherty (mdrxy) marked this pull request as ready for review August 4, 2026 14:52

@open-swe open-swe Bot left a comment

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.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

Comment thread libs/code/deepagents_code/config_manifest.py
…n `config`

An explicitly empty value classifies as falsy in `should_run_onboarding`,
so the manifest option now declares `empty_env_is_false` to keep
`config get startup.onboarding` in agreement with the runtime.
@mdrxy
Mason Daugherty (mdrxy) merged commit 43293e9 into main Aug 4, 2026
55 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/code/onboarding-env-var branch August 4, 2026 15:14
Mason Daugherty (mdrxy) pushed a commit to langchain-ai/docs that referenced this pull request Aug 4, 2026
Fixes DOC-1484

## Summary

- Adds `DEEPAGENTS_CODE_ONBOARDING` to the environment variable
reference in `src/oss/deepagents/code/configuration.mdx`
- Documents all three states: truthy (force onboarding on every
startup), falsy (suppress onboarding — useful for CI/containers), and
unset (default first-run behavior via completion marker)
- Notes that the former `DEEPAGENTS_CODE_DEBUG_ONBOARDING` variable is
no longer recognized

## Links

- Linear:
https://linear.app/langchain/issue/DOC-1484/document-tri-state-deepagents-code-onboarding-environment-variable
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1785856462705709
- Source PR: langchain-ai/deepagents#5301

## Verification

Not run; docs-only copy change to a reference field block.

## Reviewers

Requested review from: @npentrel, @lnhsingh

---------

Co-authored-by: Docs Bot <brace@langchain.dev>
Johannes du Plessis (johannes117) pushed a commit that referenced this pull request Aug 4, 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`. 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.52](deepagents-code==0.1.51...deepagents-code==0.1.52)
(2026-08-04)

### Features

- Hooks v2 is now generally available, with support for loading hooks
from installed plugins.
([#5307](#5307),
[#5198](#5198))
- Auto approval classifier configuration now supports selecting the
classifier model and setting a review timeout.
([#5205](#5205),
[#5302](#5302))
- HITL rejection reasons are now framed for the model, and the approval
menu makes reject-with-feedback easier to discover.
([#5259](#5259),
[#5260](#5260))
- Added a tri-state `DEEPAGENTS_CODE_ONBOARDING` environment variable.
([#5301](#5301))
- The `/model` footer Ctrl+N hint now follows the current display mode.
([#5247](#5247))
- The price catalog now refreshes hourly in the background.
([#5264](#5264))
- Updated recommendations to include DeepSeek V4 Flash 0731.
([#5244](#5244))

### Bug Fixes

- Fixed several Hooks v2 lifecycle issues: session-end teardown is now
bounded, hooks refresh after cwd switches, malformed hook resumes are
handled, hook stops surface without agent errors, and unused
`SessionEndCause` members were removed.
([#5248](#5248),
[#5249](#5249),
[#5233](#5233),
[#5276](#5276),
[#5240](#5240))
- `PreCompact` now fires before auto-compaction.
([#5277](#5277))

_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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dcode Related to `deepagents-code` feature New feature/enhancement or request for one internal User is a member of the `langchain-ai` GitHub organization size: S 50-199 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant