Skip to content

feat: add --terminal flag to control clientCapabilities.terminal#155

Open
DMQ wants to merge 2 commits intoopenclaw:mainfrom
DMQ:feature/terminal-flag
Open

feat: add --terminal flag to control clientCapabilities.terminal#155
DMQ wants to merge 2 commits intoopenclaw:mainfrom
DMQ:feature/terminal-flag

Conversation

@DMQ
Copy link
Copy Markdown

@DMQ DMQ commented Mar 17, 2026

Add a new command-line flag --terminal (default: true) that allows users to control whether the terminal capability is enabled in clientCapabilities during ACP initialization.

Usage:
acpx --terminal=false codex exec "list files"
acpx --no-terminal codex exec "list files"

Changes:

  • Add terminal option to AcpClientOptions in types.ts
  • Add --terminal flag to CLI in cli/flags.ts
  • Pass terminal option through all session runtime functions
  • Use terminal option in ACP client initialization

Developer and others added 2 commits March 17, 2026 18:52
Add a new command-line flag --terminal (default: true) that allows users
to control whether the terminal capability is enabled in clientCapabilities
during ACP initialization.

Usage:
  acpx --terminal=false codex exec "list files"
  acpx --no-terminal codex exec "list files"

Changes:
- Add terminal option to AcpClientOptions in types.ts
- Add --terminal flag to CLI in cli/flags.ts
- Pass terminal option through all session runtime functions
- Use terminal option in ACP client initialization
# Conflicts:
#	src/session-runtime.ts
#	src/session-runtime/prompt-runner.ts
@dutifulbob
Copy link
Copy Markdown
Collaborator

Triage result

  • Human attention: ⚠️ Required
  • Recommendation: 🏁 escalate to a human
  • Human decision needed: determine and run the appropriate targeted validation for the new --terminal/--no-terminal behavior, then make the landing decision

Quick read

This PR adds a CLI switch to control whether acpx advertises ACP terminal capability during client initialization. The solution was judged right-shaped, but this run stopped on the human handoff path because no targeted local validation command could be derived for the feature.

Intent

Give acpx users a CLI switch to turn ACP terminal support on or off, so they can run agents without exposing terminal access when they do not want it.

Underlying problem: acpx currently hardcodes clientCapabilities.terminal to true during ACP initialization, so users cannot disable terminal capability in environments or workflows where it should be hidden or unsupported.

Why

This is a feature path, not a bug-repro path. The change adds new user-facing behavior through --terminal / --no-terminal and threads that behavior through ACP initialization and session runtime code.

Targeted validation was considered necessary because the flag affects multiple runtime entry points, but the flow could not derive a concrete targeted test command. The current validation state is feature_not_validated.

Codex review

The solution was judged good_enough in shape:

  • src/client.ts changes ACP initialization from a hardcoded terminal capability to a runtime-controlled value.
  • src/cli/flags.ts adds the global terminal boolean and resolves --no-terminal to false.
  • src/cli-core.ts, src/session-runtime.ts, and queue-owner/prompt-runner paths propagate the setting through the main execution paths.

Initial merge conflicts were detected earlier against origin/main in:

  • src/session-runtime.ts
  • src/session-runtime/prompt-runner.ts

No separate Codex review findings are available in this handoff state.

CI/CD

No CI/CD result is available in this handoff state.

No final conflict-gate result is available either. The current run state only records the earlier initial conflict detection plus the validation stop condition.

Recommendation

Escalate to a human.

Recommended next action: identify the correct targeted validation for the new terminal-capability flag behavior, run it, and then decide whether the PR is ready to land.

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.

2 participants