Skip to content

feat: add commands.shellProfile option for custom shell profile loading#52154

Open
easyteacher wants to merge 1 commit intoopenclaw:mainfrom
easyteacher:work/commandprofile
Open

feat: add commands.shellProfile option for custom shell profile loading#52154
easyteacher wants to merge 1 commit intoopenclaw:mainfrom
easyteacher:work/commandprofile

Conversation

@easyteacher
Copy link
Copy Markdown

@easyteacher easyteacher commented Mar 22, 2026

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: Users could not specify a custom shell profile file for command execution, causing commands to run without user-defined environment variables, aliases, and functions.

  • Why it matters: Users with custom shell configurations (e.g., custom PATH, aliases, environment variables) could not leverage these in OpenClaw's command execution, leading to "command not found" errors or missing environment setup.

  • What changed: Added commands.shellProfile configuration option that accepts an absolute file path to a shell profile. When set, PowerShell, bash, zsh, and sh will source/load this profile before executing commands.

  • What did NOT change (scope boundary): Default shell behavior remains unchanged when shellProfile is not configured. No changes to existing command execution logic beyond profile loading.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

  • New configuration option: commands.shellProfile (string, optional)
    • Must be an absolute file path
    • When set, the specified profile file is loaded before executing shell commands
    • Supported shells: PowerShell, bash, zsh, sh
  • Example configuration:
    {
      "commands": {
        "shellProfile": "C:\\Users\\username\\Documents\\PowerShell\\Microsoft.PowerShell_profile.ps1"
      }
    }

Security Impact (required)

  • New permissions/capabilities? (Yes)

    • Risk: Users can specify arbitrary file paths to be sourced by the shell
    • Mitigation: Path validation requires absolute path; file must exist on user's local system; this is a user-configured option, not externally controlled
  • Secrets/tokens handling changed? (No)

  • New/changed network calls? (No)

  • Command/tool execution surface changed? (Yes)

    • Risk: Sourcing arbitrary profile files could execute malicious code
    • Mitigation: Only the user themselves can configure this option; it's their own profile file
  • Data access scope changed? (No)

Repro + Verification

Environment

  • OS: Windows 11 / Linux / macOS
  • Runtime/container: Node.js
  • Model/provider: N/A
  • Integration/channel (if any): N/A
  • Relevant config (redacted):
    {
      "commands": {
        "shellProfile": "/home/user/.bashrc"
      }
    }

Steps

  1. Add shellProfile to openclaw.json config with an absolute path to your shell profile
  2. Run openclaw doctor to verify config is valid
  3. Execute a command that depends on environment variables or aliases defined in your profile
  4. Verify the command has access to your custom environment

Expected

  • Config validation passes
  • Commands execute with custom environment from specified profile

Actual

  • Works as expected

Evidence

Attach at least one:

  • [] Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Before:
图片

After:
After

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:

    • Config validation accepts valid absolute paths
    • Config validation rejects relative paths with clear error message
    • PowerShell profile loading works with -NoProfile flag followed by manual sourcing
  • Edge cases checked:

    • Empty string shellProfile is treated as unset
    • Whitespace-only shellProfile is treated as unset
    • Paths with single quotes are properly escaped
  • What you did not verify:
    Running on macOS/Linux

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (Yes)
    • New optional config key: commands.shellProfile
  • Migration needed? (No)

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: Remove shellProfile from config or set to empty string
  • Files/config to restore: N/A (backward compatible)
  • Known bad symptoms reviewers should watch for:
    • "shellProfile must be an absolute file path" validation error
    • Commands failing to find expected aliases/functions if profile path is incorrect

Risks and Mitigations

  • Risk: User specifies non-existent profile file path

    • Mitigation: Shell will fail gracefully; user can verify file exists
  • Risk: Profile file contains syntax errors

    • Mitigation: Shell errors will be visible in command output; user can fix their profile
  • Risk: Profile loading slows down command execution

    • Mitigation: This is opt-in; users who need this feature accept the trade-off

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Mar 22, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 22, 2026

Greptile Summary

This PR adds an opt-in commands.shellProfile configuration option that lets users specify an absolute path to a shell profile file that is sourced before every command execution. When set, PowerShell, bash, zsh, and sh all load the profile inline (via . 'profile'; command concatenated into a single -c argument), which correctly handles POSIX non-interactive shell semantics.

Key changes:

  • shell-utils.ts: New getShellConfig(shellProfile?) signature and exported applyProfilePrefix helper that merges the source-prefix and command into a single argument, fixing POSIX -c semantics for all supported shells.
  • bash-tools.exec-runtime.ts / supervisor.ts: Pre-computed shell/shellArgs are passed from the exec layer to the supervisor for PTY mode, so getShellConfig (and its logWarn) is invoked exactly once per command even in the PTY path.
  • zod-schema.session.ts: Validation accepts empty string or an absolute path; cross-platform absolute-path detection covers Unix, Windows drive-letter, and UNC paths.
  • Test coverage: Windows quote-escaping, empty/whitespace profile, all supported shells, fish-fallback, and all applyProfilePrefix branches are tested.

All issues raised in prior review rounds have been addressed: the --init-file / non-interactive bash bug, the POSIX -c argument-dropping issue for zsh/sh, the duplicate logWarn in PTY mode, the missing applyProfilePrefix helper, and the Windows test assertion suffix.

Confidence Score: 4/5

  • This PR is safe to merge; all previously identified critical and logic-level issues have been resolved and the implementation is correct.
  • All P0/P1 issues from prior review rounds are resolved: the POSIX -c argument-dropping bug for zsh/sh/fish-fallback, the bash --init-file non-interactive shell bug, the duplicate logWarn in PTY mode, and the missing applyProfilePrefix abstraction. The test suite now correctly asserts the trailing '; ' suffix for Windows assertions. No new logic bugs are apparent. Score is 4 rather than 5 only because macOS/Linux end-to-end verification was explicitly noted as not performed by the author, and the feature touches shell execution paths where environment differences can surface unexpectedly.
  • No files require special attention — the core logic changes in src/agents/shell-utils.ts and src/agents/bash-tools.exec-runtime.ts look correct.

Reviews (4): Last reviewed commit: "feat: add commands.shellProfile option f..." | Re-trigger Greptile

Comment thread src/agents/shell-utils.ts Outdated
Comment thread src/agents/shell-utils.ts Outdated
Comment thread src/agents/shell-utils.test.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a17a503db6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/shell-utils.ts
Comment thread src/agents/shell-utils.ts Outdated
@easyteacher easyteacher force-pushed the work/commandprofile branch 3 times, most recently from e25351b to 5401087 Compare March 22, 2026 09:32
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5401087b69

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/bash-tools.exec-runtime.ts
@easyteacher easyteacher force-pushed the work/commandprofile branch from 5401087 to b288254 Compare March 22, 2026 09:41
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b28825483d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/zod-schema.session.ts Outdated
Comment thread src/agents/pi-tools.ts Outdated
@easyteacher easyteacher force-pushed the work/commandprofile branch from b288254 to e2ab098 Compare March 22, 2026 09:51
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e2ab098faa

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/bash-tools.exec.ts Outdated
@easyteacher easyteacher force-pushed the work/commandprofile branch from e2ab098 to 2eedd81 Compare March 22, 2026 10:03
@easyteacher
Copy link
Copy Markdown
Author

@greptile-apps Please re-evaluate

Comment thread src/agents/bash-tools.exec-runtime.ts Outdated
Comment thread src/agents/shell-utils.ts
@easyteacher easyteacher force-pushed the work/commandprofile branch 2 times, most recently from b56603a to e90f1e1 Compare March 22, 2026 10:26
@easyteacher
Copy link
Copy Markdown
Author

@greptile-apps Please re-evaluate

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e90f1e13f8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/shell-utils.ts
Comment thread src/agents/bash-tools.exec-runtime.ts
@easyteacher
Copy link
Copy Markdown
Author

@greptile-apps Please re-evaluate

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9b57fe3bd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/shell-utils.ts Outdated
@easyteacher easyteacher force-pushed the work/commandprofile branch from d9b57fe to 8f84703 Compare March 23, 2026 09:21
@easyteacher easyteacher force-pushed the work/commandprofile branch 3 times, most recently from 4e73b7f to 49bb269 Compare March 23, 2026 15:40
@easyteacher
Copy link
Copy Markdown
Author

easyteacher commented Mar 23, 2026

All passed, and it turns out scripts\generate-base-config-schema.ts doesn't work properly on Windows.

#52989

@easyteacher easyteacher force-pushed the work/commandprofile branch 4 times, most recently from 50446e7 to e1a14c6 Compare March 26, 2026 07:01
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1a14c6536

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/bash-tools.exec-runtime.ts
@easyteacher easyteacher force-pushed the work/commandprofile branch 2 times, most recently from f9b1a99 to e41f7a4 Compare March 26, 2026 14:27
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e41f7a4b6e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/bash-tools.exec-host-gateway.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db912620ce

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/bash-tools.exec-runtime.ts
@easyteacher easyteacher force-pushed the work/commandprofile branch 2 times, most recently from b4c1659 to 16dc185 Compare March 27, 2026 01:13
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16dc185eaf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/bash-tools.exec.ts
@easyteacher easyteacher force-pushed the work/commandprofile branch from 16dc185 to 9f051b3 Compare March 27, 2026 01:43
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f051b329c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/.generated/config-baseline.jsonl Outdated
@easyteacher easyteacher force-pushed the work/commandprofile branch from 9f051b3 to 019c33f Compare March 27, 2026 02:34
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 019c33fd66

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/zod-schema.session.ts Outdated
@easyteacher easyteacher force-pushed the work/commandprofile branch from 019c33f to 3bef192 Compare March 27, 2026 02:50
- Add shellProfile option to CommandsConfig type
- Add Zod schema validation requiring absolute file path
- Add help text and label for shellProfile config
- Update getShellConfig() to accept and use shellProfile parameter
- Support PowerShell, bash, zsh, and sh profile loading
- PowerShell: source profile with . 'path'; prefix
- Bash/Zsh/Sh: use source command prefix (non-interactive shells ignore --init-file)
- Fix POSIX shell -c argument handling: concatenate source prefix with command
- Pass shellProfile through exec tool chain
- Add tests for shellProfile functionality
@easyteacher easyteacher force-pushed the work/commandprofile branch from 3bef192 to 969cdaa Compare March 28, 2026 15:07
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 969cdaaf85

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/shell-utils.ts
Comment on lines +101 to +103
if (baseName === "bash" || baseName === "zsh" || baseName === "sh") {
return { shell, args: ["-c", buildSourcePrefix(profile)] };
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Source shellProfile for dash/ksh-style POSIX shells

The profile-loading branch only runs when baseName is exactly bash, zsh, or sh, so hosts where $SHELL is dash/ksh (or other POSIX shells that still support .) silently skip commands.shellProfile and execute with plain -c. In those environments, commands that rely on profile-defined PATH/aliases/functions will fail even though a valid absolute shellProfile is configured.

Useful? React with 👍 / 👎.

@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented Apr 28, 2026

Codex review: needs changes before merge.

Summary
The PR adds an optional commands.shellProfile config key and threads explicit shell profile sourcing through exec, chat bash, supervisor PTY, config schema/help, generated docs, and focused tests.

Reproducibility: yes. Current-main absence is source-reproducible from CommandsSchema and shell source search, and the PR's current blocking CI failure is reproducible from the public check annotation on the head SHA.

Next step before merge
A repair worker can make the branch reviewable by rebasing and addressing the narrow unused import, changelog, and shell-startup preservation blockers; final feature acceptance remains maintainer review.

Security
Needs attention: No supply-chain or secret-handling issue was found, but the command-execution changes must preserve current startup-file hardening before merge.

Review findings

  • [P2] Remove the unused supervisor import — src/process/supervisor/supervisor.ts:3
  • [P2] Add the required changelog entry — src/config/schema.help.ts:1118-1119
  • [P2] Preserve suppressed shell startup args — src/agents/shell-utils.ts:97-108
Review details

Best possible solution:

Land a rebased implementation of an explicit opt-in shell profile setting that preserves current startup-file suppression and placeholder-shell fallback, keeps allowlist-enforced commands profile-free, documents host limitations, adds focused regression tests, and includes a changelog entry.

Do we have a high-confidence way to reproduce the issue?

Yes. Current-main absence is source-reproducible from CommandsSchema and shell source search, and the PR's current blocking CI failure is reproducible from the public check annotation on the head SHA.

Is this the best way to solve the issue?

No. The feature direction is plausible, but this branch is not the best mergeable solution until it is rebased onto current main and fixes the unused import, changelog, and shell-startup contract regression.

Full review comments:

  • [P2] Remove the unused supervisor import — src/process/supervisor/supervisor.ts:3
    The PR head's check run is already failing because createSubsystemLogger is imported here and never used. Remove it or wire it up before this can pass CI.
    Confidence: 0.99
  • [P2] Add the required changelog entry — src/config/schema.help.ts:1118-1119
    This adds a user-facing commands.shellProfile config feature, but the PR does not update CHANGELOG.md. Repo policy requires a changelog bullet for user-facing feature changes.
    Confidence: 0.92
  • [P2] Preserve suppressed shell startup args — src/agents/shell-utils.ts:97-108
    Current main suppresses bash, zsh, and fish startup files and avoids placeholder shells such as false/nologin. This branch falls back to plain -c, so rebasing must keep getPosixShellArgs and the placeholder-shell logic while adding explicit profile sourcing.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.9

Security concerns:

  • [medium] Preserve default startup-file suppression — src/agents/shell-utils.ts:97
    The PR head predates current main's bash/zsh/fish startup-file suppression and falls back to plain -c, which can re-enable implicit shell startup files without the explicit shellProfile opt-in.
    Confidence: 0.86

Acceptance criteria:

  • pnpm test src/agents/shell-utils.test.ts src/process/supervisor/supervisor.pty-command.test.ts
  • pnpm exec oxfmt --check --threads=1 src/agents/shell-utils.ts src/agents/shell-utils.test.ts src/agents/bash-tools.exec-runtime.ts src/agents/bash-tools.exec.ts src/agents/bash-tools.exec-host-gateway.ts src/process/supervisor/supervisor.ts src/process/supervisor/types.ts src/config/zod-schema.session.ts src/config/schema.help.ts src/config/schema.labels.ts src/config/types.messages.ts src/auto-reply/reply/bash-command.ts CHANGELOG.md
  • pnpm check:changed

What I checked:

  • current-main absence: Current main has a strict CommandsSchema with no shellProfile key, so the requested config option is not implemented on main. (src/config/zod-schema.session.ts:202, 06056926a099)
  • current-main shell contract: Current main centralizes POSIX shell arguments in getPosixShellArgs, suppressing bash/zsh/fish startup files and handling placeholder shells such as false and nologin. (src/agents/shell-utils.ts:54, 06056926a099)
  • PR head implementation is stale against shell contract: The PR head adds getShellConfig(shellProfile?), but its non-Windows path falls back to plain -c and does not include current main's startup suppression or placeholder-shell handling. (src/agents/shell-utils.ts:63, 969cdaaf85f3)
  • mergeability: GitHub's public PR API reports mergeable: false, rebaseable: false, and mergeable_state: dirty for the current head. (969cdaaf85f3)
  • failing check annotation: The check run on the PR head fails because createSubsystemLogger is imported but never used. (src/process/supervisor/supervisor.ts:3, 969cdaaf85f3)
  • missing changelog: The PR file list does not include CHANGELOG.md, and the PR head changelog has no commands.shellProfile entry despite the user-facing feature. (CHANGELOG.md:1, 969cdaaf85f3)

Likely related people:

  • NewdlDewdl: Authored the related shell startup-file suppression work in fix(exec): prevent shell startup files from overriding daemon env #40200, including commits that add bash/zsh/fish startup suppression in src/agents/shell-utils.ts. (role: introduced behavior; confidence: high; commits: ff642cfd2c85, 8d1841b2f715, 826e79cd2e78; files: src/agents/shell-utils.ts, src/agents/shell-utils.test.ts)
  • sk7n4k3d: Added the current placeholder-shell fallback for /usr/bin/false and nologin, which this PR must preserve when rebased. (role: adjacent owner; confidence: medium; commits: 7b414d8c0b9f; files: src/agents/shell-utils.ts, src/agents/shell-utils.test.ts)
  • steipete: Recent maintainer across exec runtime, supervisor, and config schema paths touched by this PR, and committer on adjacent shell fallback work. (role: recent maintainer; confidence: medium; commits: c6817d8d7ab9, 220239284902, c035c5c0d235; files: src/agents/bash-tools.exec-runtime.ts, src/process/supervisor/supervisor.ts, src/config/zod-schema.session.ts)
  • vincentkoc: Recently touched agent exec diagnostics and config schema areas that intersect with the PR's execution/config surface. (role: recent adjacent maintainer; confidence: medium; commits: 3e3bba4f305e, cc88b4a72df0, 69b66dd5483e; files: src/agents/bash-tools.exec-runtime.ts, src/config/zod-schema.session.ts)

Remaining risk / open question:

  • Final acceptance still needs maintainer product/security judgment because the feature intentionally sources a user-selected file before command execution.
  • The PR body only claims Windows manual verification; Linux/macOS behavior should be checked after rebase.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 06056926a099.

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

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: allow command exec to specify shell profile

1 participant