Skip to content

Thread records omit executed model/reasoning/permission, and plugin logs retain ~100 lines — placement and incidents are both unverifiable #1787

Description

@pixexid

Two gaps in one surface, reported together because the same missing observability produces both.

1. The executed profile is not readable

bb thread show <id> --json returns thread, environment and pendingTodos. The thread record carries providerId and visibility and carries no model, no reasoning level, and no permission mode. A spawn accepts --model and --reasoning-level; nothing reads back what actually ran.

The consequence for anyone running a model-to-role routing policy is that the policy cannot be checked. Every claim of the form "this agent ran on model X" is a restatement of the request. If a --model flag were silently ignored, no caller could tell.

We hit this concretely twice. A placement probe dispatched specifically to grade one model reported Requested: codex/gpt-5.6-terra/medium and Executed: codex/gpt-5.6-terra/medium — the "executed" row was the request tuple, because nothing else exists to read. A later run of the same probe, instructed not to infer execution from request flags, reported those fields as unknown. The weaker-looking report was the correct one, and we could not distinguish them from any surface.

A related failure mode: a spawn that omits --model inherits a sticky project-level default, so a whole fleet can silently converge on a model nobody selected — and because the default is also unwritten, nobody even knows what to check for. With no read-back, nobody notices.

What would resolve it: an executed-profile field on the thread record or the turn, distinguishing requested from executed.

2. Plugin logs retain about 100 lines

bb plugin logs <plugin> holds roughly the last hundred entries. An incident we investigated spanned about 21 hours; by the time anyone looked, the early evidence was gone. Two refusal records from one seat survived and four from another had already rolled off, purely by recency — so which half of an incident is reconstructable is decided by when someone happens to ask, not by what happened.

The practical effect is that root-cause work on anything older than a few hours has to reason from absence, and "nothing was recorded" is indistinguishable from "nothing happened".

What would resolve it: a larger or configurable retention bound, or a durable log the plugin can write to. The useful bound is an incident window rather than a line count — at current volume the present limit guarantees rolling off mid-incident, which is the defect class, and a fixed larger number would only move where it happens.

Both are observability gaps rather than functional bugs, which is why they went unnoticed until we tried to audit our own behaviour and found we could not.

Activity

  1. pixexid commented on Aug 18, 2026

    @pixexid
    Author

    Correction to section 1. "Nothing reads back what actually ran" is too strong. For one provider bridge the executed model, provider and reasoning level are recoverable from a per-thread session file and from environment variables the bridge sets. That is not true of the other providers we use, and it is not exposed by bb's own thread record, which still carries only providerId and visibility.

    The gap is therefore uneven rather than total, and the unevenness is its own problem: code that verifies placement works on one provider and silently cannot on the others, with no API-level way to tell which case you are in.

    The side-file readback also fails closed in the wrong direction for audit purposes: it exists only while the bridge's session artifacts persist, so the same thread can be verifiable on Tuesday and unverifiable on Friday.

    The ask is unchanged and is now sharper — an executed-profile field on the thread record or the turn, uniform across providers, distinguishing requested from executed.

  2. pixexid commented on Aug 18, 2026

    @pixexid
    Author

    Related: a thread whose environment no longer exists still reports idle and accepts undeliverable queue sends — #1789. Same surface, different defect class: this issue is about not being able to verify what ran; that one is about not being able to know an instruction was never deliverable.

  3. pixexid commented on Aug 18, 2026

    @pixexid
    Author

    A further correction, in the opposite direction from the first. There is no executed-profile readback — but there is a field named execution, and it holds the request.

    It appears on client/turn/requested and carries model, serviceTier, reasoningLevel and permissionMode. Its own source field says client/turn/requested, so the data is internally honest; the name is not.

    This is worse than the absence we originally reported. An absent readback makes a careful caller report unknown. A field named execution makes a careful caller report a confident, precise, wrong answer — and the wrongness is undetectable downstream, because the value is usually correct and always plausible.

    We have three agents run under the same instruction not to infer execution from request flags. Two reported unknown. The third read execution, reported it as executed, and was the only one misled — not because it was less careful, but because it trusted a field name.

    It is worth being precise about which behaviour the trap caught. The agent that was misled did more surface-reading than the two that reported unknown; it went looking for a real source instead of stopping at the request flags, found something that presented as one, and was penalised for the extra diligence. That inverts the usual safety gradient, where trying harder makes you more right. It is also why a rename alone is not sufficient: the caller doing the responsible thing needs somewhere correct to land. Adding the executed counterpart beside the request is the resolution.

  4. added
    threads
    plugins
    on Aug 18, 2026
  5. albrand commented on Aug 25, 2026

    @albrand

    Not the author of this issue — posting because I ran into the same thing independently and have a diff for the first half of it, in case it's useful to whoever picks this up.

    threadSchema omits modelOverride and reasoningLevelOverride. Both columns exist on threads and are already selected; Zod strips them here, so the values are written and stored but no API or CLI surface returns them.

    How it surfaces: selecting a reasoning level while a thread is working appears to be rejected. The picker redraws showing the level in effect for the running turn, the write has actually succeeded, and nothing can confirm it. Against a live store:

    $ bb thread update --self --reasoning-level max
    Thread thr_… updated
    Reasoning level: max
    
    $ sqlite3 ~/.bb/bb.db "select reasoning_level_override from threads where id='thr_…'"
    max
    
    $ bb thread show --self --json | jq '.thread | keys'   # 23 fields, neither override present
    
    diff --git a/packages/domain/src/thread.ts b/packages/domain/src/thread.ts
    @@ -386,6 +386,17 @@ export const threadSchema = z.object({
       originKind: threadOriginKindSchema.nullable(),
       /** Id of the plugin that spawned this thread; null for non-plugin origins. */
       originPluginId: z.string().nullable(),
    +  /**
    +   * The sticky execution profile as STORED: what applies on the next turn.
    +   *
    +   * `null` means no override is set, so the resolved default applies — it does
    +   * not mean "unknown". These columns already exist on `threads` and are already
    +   * selected; they were dropped here, so a caller that sets `--model` or
    +   * `--reasoning-level` had no way to read back that the write landed, and a
    +   * selection made mid-turn was indistinguishable from one that was rejected.
    +   */
    +  modelOverride: z.string().nullable(),
    +  reasoningLevelOverride: reasoningLevelSchema.nullable(),
       visibility: threadVisibilitySchema,
       archivedAt: z.number().nullable(),
       pinnedAt: z.number().nullable(),

    Unverified: not built, not typechecked, no test run against it — that needs a full monorepo install and I only cloned the repo. It applies cleanly to desktop-v0.39.0. Treat it as a located defect with a suggested shape rather than something merge-ready; at minimum it wants a typecheck and a schema round-trip test, and there may be consumers asserting the exact field set that I haven't checked for.

    This covers only the requested profile, not the executed one, which is the larger half of what's described here.

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

    pluginsthreads

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions