Skip to content

fix: preserve configured cwd during environment bootstrap snapshot - #11019

Closed
spwuc wants to merge 1 commit into
NousResearch:mainfrom
spwuc:fix/base-env-bootstrap-cwd-snapshot
Closed

fix: preserve configured cwd during environment bootstrap snapshot#11019
spwuc wants to merge 1 commit into
NousResearch:mainfrom
spwuc:fix/base-env-bootstrap-cwd-snapshot

Conversation

@spwuc

@spwuc spwuc commented Apr 16, 2026

Copy link
Copy Markdown

Summary

  • enter the configured cwd before capturing the shell bootstrap snapshot
  • preserve literal ~ and ~/... paths while safely quoting other cwd values
  • prevent login-shell startup defaults from overwriting the cwd supplied by ACP/terminal config

Testing

  • inspected the targeted diff for tools/environments/base.py
  • automated tests not run

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/terminal Terminal execution and process management labels Apr 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #9798 and #14831 — same root cause: init_session() captures shell snapshot before cd-ing into configured cwd. Multiple PRs exist for this fix.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused cwd-preservation patch. This behavior is already implemented on current main; this is an automated hermes-sweeper review.

@teknium1 teknium1 closed this Jul 12, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists sweeper:implemented-on-main Sweeper: behavior already present on current main tool/terminal Terminal execution and process management type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants