Skip to content

fix(tools): pass skill env vars to remote backends#1

Draft
kentimsit wants to merge 1 commit into
fix/skill-env-remote-readinessfrom
fix/remote-skill-env-passthrough
Draft

fix(tools): pass skill env vars to remote backends#1
kentimsit wants to merge 1 commit into
fix/skill-env-remote-readinessfrom
fix/remote-skill-env-passthrough

Conversation

@kentimsit

Copy link
Copy Markdown
Owner

What does this PR do?

Passes active skill/config passthrough environment variables into remote terminal backends.

This is the follow-up to the skill readiness fix. The first PR makes skill env var readiness env-driven and restores passthrough registration. This follow-up ensures those active passthrough vars are actually delivered to remote terminal execution paths.

This branch is intentionally stacked on top of:

  • fix/skill-env-remote-readiness

Relationship to the first PR

This PR depends on the readiness fix branch and is intended for review as a stacked follow-up.

The new work here is:

  • shared passthrough env resolution in the environment base layer
  • remote backend injection for Docker, Daytona, Modal, Singularity, and SSH
  • regression tests for helper resolution and representative remote backends

Changes Made

  • added a shared helper in tools/environments/base.py to resolve active passthrough env vars from:
    • tools.env_passthrough.get_all_passthrough()
    • os.environ
    • load_env() as fallback
  • updated Docker execution to pass resolved vars via docker exec -e
  • updated Daytona, Modal, Singularity, and SSH execution to prepend shell-quoted export KEY=...; statements before the command
  • added regression coverage for:
    • passthrough env resolution helper behavior
    • Docker env injection
    • Daytona env export injection
    • SSH env export injection

How to Test

  1. Run:
    uv run --extra dev python -m pytest tests/tools/test_skills_tool.py tests/tools/test_skill_env_passthrough.py tests/tools/ test_env_passthrough.py tests/tools/test_docker_environment.py tests/tools/test_daytona_environment.py tests/tools/test_ssh_environment.py -q
  2. Load a skill that registers a required env var into passthrough
  3. Run a remote terminal backend such as Docker, Daytona, or SSH
  4. Confirm the remote command can read the passthrough env var

Test Results

  • 152 passed, 11 skipped

Platform Tested

  • macOS

Notes

This PR is stacked on top of the readiness-fix branch. After the first PR merges, I will rebase this branch onto upstream/main so the
final upstream PR contains only the remote backend passthrough changes.

@kentimsit kentimsit force-pushed the fix/remote-skill-env-passthrough branch from 907592d to 39f2ca6 Compare March 27, 2026 21:47
@kentimsit

Copy link
Copy Markdown
Owner Author

Restacked this branch on top of the latest PR 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant