Shell integration & output

Use prompt marks, command results, and history navigation without a separate install step.

Harness 2.0.12 min read
On this page

Automatic for supported shells

Harness injects shell integration when spawning bash, zsh, or fish. It uses OSC 133 prompt and command markers to connect terminal output to shell activity. No separate install step is needed for the normal supported-shell launch path.

Shell integration is not the same as an agent hook. It describes shell prompts and command boundaries; agent hooks report events from a specific tool.

Move through commands instead of lines

ActionShortcut
Previous prompt⌘↑
Next prompt⌘↓
Select last finished command output⇧⌘A

Prompt marks also support the command success/failure gutter. Find (⌘F) searches across scrollback and offers regular-expression and case-sensitivity controls.

Use command boundaries in scripts

run --wait normally waits for its child command. With --keep-open, it can use the shell-integration completion mark while leaving the pane open. pane.wait supports waiting for a child or for a command boundary; inspect its schema before relying on a timeout or completion mode.

Terminal
harness-cli api describe pane.wait

Disable when troubleshooting

Terminal
harness-cli set-option shell-integration off

Because integration is injected at spawn, test changes with a newly created shell. Disabling integration removes the prompt/command information needed by related navigation and waiting features. Manual shell snippets are available in the release-pinned source reference for environments that need a custom launch path.

Source references Harness 2.0.1

Checked against the immutable shipping commit for Harness 2.0.1. For other versions, consult the installed CLI’s help and schemas.