Skip to content

session transcript is broken because of wrong usage of triple backticks on tool invocation #11513

Closed

Description

@MBanucu

Description

The transcript looks like this:

# Run echo helllo world in background

**Session ID:** ses_3ead3d098ffekMU4PkQsNKKCdy
**Created:** 1/31/2026, 6:49:03 PM
**Updated:** 1/31/2026, 6:49:51 PM

---

## User

run echo helllo world in background

---

## Assistant (Build · grok-code-fast-1 · 8.7s)

```
Tool: pty_spawn

**Input:**
```json
{
  "args": [
    "helllo",
    "world"
  ],
  "command": "echo",
  "description": "Run echo helllo world in background"
}
```
**Output:**
```
<pty_spawned>
ID: pty_c7a1cc4c
Title: echo helllo world
Command: echo helllo world
Workdir: /home/michi/dev/opencode-pty-branches/opencode-pty-demo
PID: 610891
Status: running
</pty_spawned>
```
```

---

## Assistant (Build · grok-code-fast-1 · 2.0s)

Running 'echo helllo world' in background. Session ID: pty_c7a1cc4c

It should complete quickly since it's just echo. Use pty_read if you want to see output.

---

## User

PTY Web Server URL: http://localhost:39157/

---

## User

run bash in background

---

## Assistant (Build · grok-code-fast-1 · 2.3s)

```
Tool: pty_spawn

**Input:**
```json
{
  "args": [],
  "command": "bash",
  "description": "Run bash shell in background"
}
```
**Output:**
```
<pty_spawned>
ID: pty_63ea94bf
Title: bash
Command: bash 
Workdir: /home/michi/dev/opencode-pty-branches/opencode-pty-demo
PID: 611338
Status: running
</pty_spawned>
```
```

---

## Assistant (Build · grok-code-fast-1 · 1.2s)

Running bash in background. Session ID: pty_63ea94bf

You can send commands with pty_write or read output with pty_read.

---

It seems like the whole tool invocation is wrapped in triple backticks and inside of it the output is also wrapped in triple backticks and this does not work. Either make the outer tool invocation use quadruple backticks or better: no backticks for the whole tool invocation because it seems misplaced. Just remove the triple backticks on the whole tool invocation.

Plugins

opencode-pty

OpenCode version

1.1.47-f834915

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

NixOS 25.11

Terminal

kgx

Activity

  1. github-actions commented on Jan 31, 2026

    @github-actions
    Contributor

    Thanks for reporting this! I've searched through existing issues and found a potentially related issue worth checking:

    This seems to be a specific formatting issue with how tool invocations are wrapped in backticks in session transcripts. The suggestion in your report to remove the outer triple backticks makes sense, or use quadruple backticks for the outer wrapping to avoid the conflict.

  2. added a commit that references this issue on Feb 1, 2026
    70a9917
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions