Shell integration & output
Use prompt marks, command results, and history navigation without a separate install step.
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
| Action | Shortcut |
|---|---|
| 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.
harness-cli api describe pane.waitDisable when troubleshooting
harness-cli set-option shell-integration offBecause 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.
Paths without accidental execution
Insert Path (⌥⌘I) inserts shell-quoted filenames into the originating pane without a trailing Return. Go to Directory (⌥⌘G) is the separate action that explicitly sends cd. Both stay attached to their source host and pane.
Find (⌘F) searches one pane and supports regular expressions. Search All Sessions searches literal text across retained output in open sessions; closed output is not a searchable archive.
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.