Skip to content

feat: add ROO_ACTIVE env variable to terminal env settings#11862

Merged
hannesrudolph merged 1 commit intoRooCodeInc:mainfrom
ajjuaire:feat/add-roo-active-env-var
Mar 5, 2026
Merged

feat: add ROO_ACTIVE env variable to terminal env settings#11862
hannesrudolph merged 1 commit intoRooCodeInc:mainfrom
ajjuaire:feat/add-roo-active-env-var

Conversation

@ajjuaire
Copy link
Contributor

@ajjuaire ajjuaire commented Mar 4, 2026

Related GitHub Issue

Closes: #11864

Roo Code Task Context (Optional)

N/A

Description

Adds ROO_ACTIVE: "true" to the terminal environment variables in Terminal.getEnv(). This allows scripts and tools running inside Roo Code terminals to detect they are in a Roo Code session by checking the ROO_ACTIVE env variable, enabling safety guardrails against destructive operations initiated by Roo.

Test Procedure

  1. Open a Roo Code terminal
  2. Run echo $ROO_ACTIVE — should output true
  3. Verify other env variables (PAGER, VTE_VERSION) are unaffected

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

image

Documentation Updates

  • No documentation updates are required.

Additional Notes

Minimal one-line change to the env object in getEnv().

Get in Touch

Interactively review PR in Roo Code Cloud

@ajjuaire ajjuaire marked this pull request as ready for review March 4, 2026 22:23
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. Enhancement New feature or request labels Mar 4, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 4, 2026
@ajjuaire ajjuaire force-pushed the feat/add-roo-active-env-var branch from f07bb81 to fd23385 Compare March 5, 2026 00:00
@hannesrudolph hannesrudolph merged commit 52ce796 into RooCodeInc:main Mar 5, 2026
7 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Mar 5, 2026
@ajjuaire ajjuaire deleted the feat/add-roo-active-env-var branch March 5, 2026 16:07
@github-actions github-actions bot mentioned this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add ROO_ACTIVE environment variable to terminal sessions for safety guardrails

2 participants