Skip to content

Cline cannot capture output randomly #14

@GeorgiKarapetrov

Description

@GeorgiKarapetrov

Problem

Cline captures output sometimes but sometimes it does not. I cannot see a clear pattern it can happen at any point.

Basically, it hangs after shell execution ends. If I reenter the last command again, cline continues with the next step, the command output suddenly appears and reads something like

The command's output could not be captured due to some technical issue, however it has been executed successfully. Here's the current terminal's content to help you get the command's output:

venv $ find e2e_testing -name "requirements.txt" -o -name "*.txt" | head -10

Obviously a python venv is active in the project folder. I choose the command find e2e_testing -name "requirements.txt" -o -name "*.txt" | head -10 just because Cline will hang on it or similar commands sometimes. Sometimes it's ls, sometimes they are long running commands.

Contents of .bashrc:

source "$HOME"/.config/shell/profile
source "$HOME"/.secret

complete -cf sudo

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=-1
HISTFILESIZE=-1

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
# shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)"

# Conditional loading based on execution context
if [[ "$CLINE_ACTIVE" == "true" ]] || [[ "$TERM_PROGRAM" == "vscode" ]]; then
    # Minimal configuration for programmatic execution
    # Skip aliases and heavy completions to prevent freezing
    export PS1=' $ '
else
    # some other stuffs
    echo
fi

In .profile and .secret I'm just exporting environment variables and this:

# Set font when running in console
if [ "$TERM" == linux ]; then
    /bin/setfont /usr/share/kbd/consolefonts/ter-132n.psf.gz
fi

Please, let me know if you I can provide more info to you.

Debug Console Logs

(node:170216) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `exe --trace-deprecation ...` to show where the warning was created)
Congratulations, your extension "autoscrolldown" is now active!
[TelemetryService] Initialized with PostHogClientProvider
Cline environment: production
Registered diff method: openDiff
Registered diff method: getDocumentText
Registered diff method: replaceText
Registered diff method: scrollDiff
Registered diff method: truncateDocument
Registered diff method: saveDocument
Registered diff method: closeAllDiffs
Registered diff method: openMultiFileDiff
Registered env method: clipboardWriteText
Registered env method: clipboardReadText
Registered env method: getMachineId
Registered env method: getHostVersion
Registered testing method: getWebviewHtml
Registered watch method: subscribeToFile (streaming)
Registered window method: showTextDocument
Registered window method: showOpenDialogue
Registered window method: showMessage
Registered window method: showInputBox
Registered window method: showSaveDialog
Registered window method: openFile
Registered window method: openSettings
Registered window method: getOpenTabs
Registered window method: getVisibleTabs
Registered window method: getActiveEditor
Registered workspace method: getWorkspacePaths
Registered workspace method: saveOpenDocumentIfDirty
Registered workspace method: getDiagnostics
Registered workspace method: searchWorkspaceItems
Registered workspace method: openProblemsPanel
Registered workspace method: openInFileExplorerPanel
Added subscriptions
Distribution:
  Code: <MY_HOME_DIR>/.config/Code/
  └ User: <MY_HOME_DIR>/.config/Code/User
    ├ credentials: <MY_HOME_DIR>/.config/Code/User/credentials.json
    ├ extensions:  <MY_HOME_DIR>/.config/Code/User/extensions.json
    ├ keybindings: <MY_HOME_DIR>/.config/Code/User/keybindings.json
    ├ locale:      <MY_HOME_DIR>/.config/Code/User/locale.json
    ├ settings:    <MY_HOME_DIR>/.config/Code/User/settings.json
    └ Snippets:    <MY_HOME_DIR>/.config/Code/User/snippets
  .vscode: <MY_HOME_DIR>/.vscode/
  ├  Extensions: <MY_HOME_DIR>/.vscode/extensions/
  ├  ExtensionsObsolete: <MY_HOME_DIR>/.vscode/extensions/.obsolete
  └  argv:       <MY_HOME_DIR>/.vscode/argv.json
  macos: false
Added distribution
repo: <MY_VSCODE_SETTINGS_REPOSITORY_ADDRESS>
branch: <MY_VSCODE_SETTINGS_REPOSITORY_BRANCH>
autoSync: false
includeHostnameInCommitMessage: true
authenticated: true
[INFO] 2025-08-21T21:13:19.742Z - Translations initialized.
[INFO] 2025-08-21T21:13:19.749Z - Extension activated!
Setting up vscode host providers...
FileContextTracker: Processed 1 tasks, found 0 pending warnings, 0 orphaned, deleted 0, took 0ms
Extension context was not provided to AuthService.getInstance, using default context
No stored authentication credential found.
No user found after restoring auth token
Server "github.com/upstash/context7-mcp" info: Context7 Documentation MCP Server running on stdio
Server "github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking" info: Sequential Thinking MCP Server running on stdio
OS: Linux linux x64 6.16.1-zen1-1-zen
Shell: /usr/bin/bash
Shell Version: GNU bash, version 5.3.3(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Node.js Version: v22.17.0
VSCode Version: 1.103.1
Running command: find e2e_testing -name "requirements.txt" -o -name "*.txt" | head -10
Waiting for shell integration...
Shell integration changed for terminal shell-integration-problems
Shell integration changed for terminal shell-integration-problems
Shell integration available
Shell execution started in terminal shell-integration-problems
Read chunk: '\x1B]633;C\x07\x1B]0;<MY_USER_NAME>@<THE_HOST_NAME>:~/test\x07'
Shell execution ended in terminal shell-integration-problems with exit code 0 for command "find e2e_testing -name "requirements.txt" -o -name "*.txt" | head -10"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions