Skip to content

[feat]: Shell mode: add pseudo-cwd so cd affects subsequent commands #766

Description

@JessyTsui

What feature would you like to see?

Background / Problem

In shell mode, each command is executed independently and cd does not persist,
which makes shell usage cumbersome.

Expected Behavior

Shell mode should maintain a pseudo-cwd so that cd <dir> affects subsequent
commands.

Proposed Approach

Track self._shell_cwd in the shell layer; pass it as cwd to subprocess calls;
handle cd internally to update the pseudo-cwd.

Scope / Impact

  • Only affects shell mode
  • Does not change the agent work directory or context

Acceptance Criteria

  • After cd subdir, pwd shows subdir
  • Relative paths resolve against pseudo-cwd
  • Clear error when directory does not exist

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions