Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

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

Merged
hannesrudolph merged 1 commit into
RooCodeInc: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 into
RooCodeInc:mainfrom
ajjuaire:feat/add-roo-active-env-var

Conversation

@ajjuaire

@ajjuaireajjuaire commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

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
@dosubotdosubotBot added size:XS This PR changes 0-9 lines, ignoring generated files. Enhancement New feature or request labels Mar 4, 2026
@dosubotdosubotBot added the lgtm This PR has been approved by a maintainer label Mar 4, 2026
@ajjuaire
ajjuaireforce-pushed the feat/add-roo-active-env-var branch from f07bb81 to fd23385CompareMarch 5, 2026 00:00
@hannesrudolph
hannesrudolph merged commit 52ce796 into RooCodeInc:mainMar 5, 2026
7 checks passed
@github-project-automationgithub-project-automationBot moved this from New to Done in Roo Code RoadmapMar 5, 2026
@ajjuaire
ajjuaire deleted the feat/add-roo-active-env-var branch March 5, 2026 16:07
@github-actionsgithub-actionsBot mentioned this pull request Mar 4, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

EnhancementNew feature or requestlgtmThis PR has been approved by a maintainersize:XSThis 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

@ajjuaire@hannesrudolph