Skip to content

Side chat replies to running-turn commentary silently inherit the previous checkpoint #6497

Closed

Description

@markasoftware-tc

Summary

Replying in Side chat to commentary from a still-running Codex turn succeeds, but the new chat silently inherits only the preceding completed turn. A new fact supplied in the selected commentary's turn is missing even though the reply quote is delivered; repeating the same Side chat operation after that turn completes inherits the fact correctly.

Investigation: sanitized synthetic run report, from Personal thread thr_inknjbjiwq. This report was authored by GPT-6.1-Sol with explicit user authorization. It uses only a small synthetic conversation, with no real project or conversation content.

Versions and environment

  • Live-tested: BB 0.47.1, Nix-packaged bb-app; matching release tag desktop-v0.47.1, base commit 5e1acd7. Installed package repository and bugs fields identify get-bb/bb.
  • Ubuntu 24.04.5 LTS; Linux 6.17.0-35-generic, x86_64.
  • Codex CLI 0.164.0, provider codex, model gpt-6.1-sol, reasoning high, permission mode auto.
  • Personal workspace, proj_personal, no Git repository; local host, no remote environment needed. Existing BB installation/default data directory; not a clean-profile test.
  • Version limitation: 0.48.0 became the latest published release by investigation time; I did not live-test that release or main. The inspected thread-fork-history.ts and Side chat server.ts have no changes between the tested release tag and inspected main at 055e758fff353c6986f3733befd13be9b86b1274. No BB installation or global settings were changed.

Steps to reproduce

  1. Start a fresh Personal Codex thread with GPT-6.1-Sol/high. Ask it to reply CHECKPOINT_READY and finish. Wait for idle; this establishes a completed checkpoint before the fact exists.

  2. In a second turn, supply a unique synthetic launch code, ask for commentary “The synthetic fixture is ready for a side reply.”, and then hold the turn with a bounded gate-file poll. The quote must not contain the code. Wait for the readiness file, created after the commentary; do not race a fixed delay.

  3. Find that commentary's completed agentMessage event sequence with bb thread log PARENT --all --json. While the gate is still closed, invoke the actual built-in Side chat backend used by the Reply action:

    bb plugin rpc call side-chat createSideChat --input-file rpc.json --json

    where rpc.json contains sourceThreadId, that event's sourceSeqEnd, and its exact anchorText. This is the normal plugin RPC, not a reimplementation of its fallback. The UI calls this same method and supplies these fields.

  4. Ask the returned fork: “Use only your inherited conversation. Do not call tools, inspect files, or contact any thread. What is the new launch code introduced in the turn containing the quoted side-reply commentary? Reply with the exact code if present; otherwise reply exactly UNKNOWN.”

  5. Release the parent's gate, wait for parent idle, and invoke the same RPC payload, still anchored to that same commentary. Ask the same question in this control fork.

The following standalone driver packages those manually executed operations, including exact prompts, readiness checks, the anchored-CLI negative control, and cleanup. It uses a fresh nonce and /tmp directory in place of the observed run's fixture paths. The packaged driver was syntax-checked, not executed a second time; the live measurements below come from the manually executed experiment.

Copy-paste reproduction driver (Python 3; run where bb and Codex are available)
"""Synthetic BB side-chat reproduction driver. Authored by GPT-6.1-Sol.

Run with Python 3 on the BB server/host with Codex available. Creates three
Personal fixture threads, archives them, and retains sanitized results in /tmp.
This driver packages the manually executed experiment; it has not been rerun.
"""
import json
from pathlib import Path
import secrets
import subprocess
import tempfile
import time

root = Path(tempfile.mkdtemp(prefix="bb-sidechat-"))
parent = None


def bb(*args):
    result = subprocess.run(["bb", *args, "--json"], capture_output=True, text=True)
    if result.returncode:
        raise RuntimeError(result.stderr + result.stdout)
    return json.loads(result.stdout)


def wait_idle(thread):
    bb("thread", "wait", thread, "--status", "idle", "--timeout", "50s")


def events(thread):
    return bb("thread", "log", thread, "--all")


def tell(thread, text):
    path = root / "message.txt"
    path.write_text(text)
    bb("thread", "tell", thread, "--message-file", str(path),
       "--model", "gpt-6.1-sol", "--reasoning-level", "high")


def sidechat(rpc):
    path = root / "rpc.json"
    path.write_text(json.dumps(rpc))
    fork = bb("plugin", "rpc", "call", "side-chat", "createSideChat",
              "--input-file", str(path))["threadId"]
    wait_idle(fork)
    return fork


query = ("Use only your inherited conversation. Do not call tools, inspect files, "
         "or contact any thread. What is the new launch code introduced in the "
         "turn containing the quoted side-reply commentary? Reply with the exact "
         "code if present; otherwise reply exactly UNKNOWN.")


def answer(thread):
    tell(thread, query)
    wait_idle(thread)
    return [e["data"]["item"]["text"].strip() for e in events(thread)
            if e["type"] == "item/completed"
            and e["data"].get("item", {}).get("type") == "agentMessage"][-1]


try:
    parent = bb("thread", "spawn", "--project", "proj_personal",
                "--new-environment", "personal", "--provider", "codex",
                "--model", "gpt-6.1-sol", "--reasoning-level", "high",
                "--parent-notifications", "off",
                "--title", "Synthetic side-chat context fixture",
                "--prompt", "Synthetic fixture: reply exactly CHECKPOINT_READY. "
                "Do not call tools or inspect files.")["id"]
    wait_idle(parent)
    nonce = "ORBIT-" + secrets.token_hex(8).upper()
    anchor = "The synthetic fixture is ready for a side reply."
    gate = f"""from pathlib import Path
import time
p = Path({str(root)!r})
(p / 'ready').touch()
deadline = time.monotonic() + 480
while not (p / 'release').exists():
    if time.monotonic() >= deadline:
        raise TimeoutError('synthetic gate expired')
    time.sleep(0.1)
print('GATE_RELEASED')"""
    tell(parent, f"The new launch code is {nonce}, introduced only this turn. "
         f"Do not repeat it in commentary or tool calls. Emit exactly this "
         f"visible commentary: {anchor}\nThen use exec_command to run this "
         "bounded condition-based gate, and poll the running command with "
         "write_stdin as needed using 30-second waits. Stay active until it "
         "exits. Use tools only for this wait; inspect no other files.\n"
         f"python3 - <<'GATE'\n{gate}\nGATE\n"
         "After release reply exactly FIXTURE_FINISHED, without the code.")
    deadline = time.monotonic() + 50
    while not (root / "ready").exists():
        if time.monotonic() >= deadline:
            raise TimeoutError("parent did not enter gate")
        time.sleep(0.1)
    before = events(parent)
    selected = [e for e in before if e["type"] == "item/completed"
                and e["data"].get("item", {}).get("text", "").strip() == anchor]
    assert len(selected) == 1
    event = selected[0]
    assert not any(e["type"] == "turn/completed" and e["seq"] > event["seq"]
                   for e in before)
    rpc = {"sourceThreadId": parent, "sourceSeqEnd": event["seq"],
           "anchorText": event["data"]["item"]["text"]}
    rejection = subprocess.run(["bb", "thread", "fork", parent,
                               "--source-seq-end", str(event["seq"]), "--json"],
                              capture_output=True, text=True)
    assert rejection.returncode != 0
    assert "has not completed" in rejection.stdout + rejection.stderr
    active = sidechat(rpc)
    active_answer = answer(active)
    (root / "release").touch()
    wait_idle(parent)
    control = sidechat(rpc)
    control_answer = answer(control)
    result = {"parent": parent, "active": active, "control": control,
              "rpc": rpc, "nonce": nonce, "active_answer": active_answer,
              "control_answer": control_answer,
              "anchored_rejection": json.loads(rejection.stdout)}
    (root / "results.json").write_text(json.dumps(result, indent=2) + "\n")
    print(json.dumps(result, indent=2))
    print("Retained synthetic results:", root)
    assert active_answer == "UNKNOWN"
    assert control_answer == nonce
finally:
    (root / "release").touch()
    if parent:
        bb("thread", "archive", parent)

Expected vs actual

Expected: a successful reply to the selected commentary has that turn's input context. If that context cannot yet be forked, the operation should communicate that limitation instead of silently starting from an older checkpoint.

Observed output, verbatim:

Direct anchored CLI fork while parent is waiting:
Error: Failed to fork thread thr_mdin7qmau3: HTTP 400: Cannot fork at sequence 30: the turn containing it has not completed

Actual Side chat createSideChat RPC during that same wait:
{
  "threadId": "thr_3c7xstukqi"
}

Active-turn Side chat answer:
UNKNOWN

Same RPC after the parent turn completed:
{
  "threadId": "thr_sxetutuh25"
}

Completed-turn Side chat answer:
ORBIT-3C705B2921EFA6DE

The direct CLI refusal alone is not the reproduction. The successful real plugin RPC followed by the measured inherited-history boundary is the reproduction. The UI itself was not clicked in this experiment.

Evidence

This is the sanitized investigation report; no raw session dump is attached. All times are UTC on 2026-10-28.

Parent thr_mdin7qmau3, Personal environment env_r2twv74qwd:

Event Time Parent event sequence
First turn completed (CHECKPOINT_READY) 23:03:11.824 24
New launch-code input requested 23:03:38.003 25
Selected commentary completed 23:03:39.728 30
Gate readiness file created 23:03:41.001 —
Active Side chat fork request recorded 23:03:55.472 —
Active fork answered UNKNOWN 23:04:09.482 —
Gate release file created 23:04:30.606 —
Parent second turn completed (FIXTURE_FINISHED) 23:04:32.254 50
Control Side chat fork request recorded 23:04:33.044 —
Control answered exact launch code 23:05:06.597 —

The gate polled every 100ms with a 480-second deadline; release occurred normally. Parent completion was absent when the active fork was made.

Hard history evidence, independent of the models' answers: read only the three known synthetic Codex rollout files, select safe header fields, enumerate JSONL records with zero-based ordinals, and sum original record byte lengths to verify each history_base.end_byte_offset.

  • Parent native session: 01a184c0-c4ea-7151-ab3c-49ac6585d65c.
  • First turn's native task_complete: ordinal 17, ending at byte 139155, timestamp 23:03:11.813.
  • New fact's native user-message record: ordinal 23, bytes 165706–167667, timestamp 23:03:38.074. The code does not appear in earlier records.
Native fork header / measurement Active fork thr_3c7xstukqi Completed control thr_sxetutuh25
forked_from_ordinal_exclusive 18 45
history_base.end_ordinal_exclusive 18 45
history_base.end_byte_offset 139155 184223
Exact inherited parent prefix contains launch code false true

Both native headers reference the correct parent session above. The active fork's local rollout also contains no code. Neither fork used command tools. The active fork's first actual provider-turn request includes this agent-only seed, so the quote itself was successfully delivered:

Replying to this earlier message in the conversation:

The synthetic fixture is ready for a side reply.

Observed versus inferred cause: the RPC success, quoted seed, older inherited boundary, and completed-turn control are directly observed. The likely causal chain is supported by the installed code and matching release source:

Cleanup: the parent gate exited normally; all turns finished. Archiving the parent archived all three fixture threads at 23:06:02.262. No polling fixture remains active. A small local sanitized artifact preserves original synthetic prompts, RPC inputs/outputs, event excerpts, and native boundary measurements.

What you ruled out

Suggested priority and effort (optional)

Medium: a mid-turn reply can silently reason from stale context. Workaround: wait for the source turn to complete before opening the side reply. No destructive data loss observed; effort not estimated.

Checks

  • I reproduced on installed 0.47.1 and explicitly disclose that latest release 0.48.0 and main were not live-tested.
  • I searched open and closed issues for the same problem.
  • This agent-authored body links its self-contained sanitized investigation report and ends with the required disclosure.

AGENT GENERATED

Activity

  1. added theissue type on Oct 28, 2026
  2. added
    threads
    side-chat
    confirmed-repro
    on Oct 28, 2026
  3. bb-slop-cop commented on Oct 28, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Medium priority · Medium effort; threads, side-chat.
    • Reproduction report: REPRODUCED, high root-cause confidence; applied confirmed-repro.
    • Evidence: repeated the actual built-in plugin RPC against real server/SQLite fixtures in two clean trusted-main checkouts. The running-turn request selects the previous checkpoint; the identical completed-turn request selects the intended checkpoint. The quoted seed survives. All 39 existing fork tests and 26 Side chat tests pass. Live model/native-rollout and browser behavior were not re-tested.
    • Root cause: Side chat catches the broad unavailable-session error and retries without sourceSeqEnd, silently dropping the requested history boundary.
    • No PR: preserving the explicitly tested pre-session fallback needs an error-contract distinction, or a product decision to remove that fallback—outside the simple-fix safety limits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproside-chatthreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions