Skip to content

fix(server): handle JSON-wrapped titles and verbose Claude output - #10446

Merged
Yash-Singh1 merged 2 commits into
pingdotgg:mainfrom
Noojuno:fix/claude-verbose-text-generation
Sep 7, 2026
Merged

fix(server): handle JSON-wrapped titles and verbose Claude output#10446
Yash-Singh1 merged 2 commits into
pingdotgg:mainfrom
Noojuno:fix/claude-verbose-text-generation

Conversation

@Noojuno

@Noojuno Noojuno commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Generated thread titles containing JSON such as {"title":"Refresh ASG instances"} were accepted as plain strings and saved with the JSON wrapper intact. Separately, Claude Code's verbose mode returns an array of conversation messages where T3 expected a single result object, causing text generation to fail.

Unwrap valid JSON objects with a string title before applying the existing whitespace cleanup, fallback, and length limit. This shared normalization covers all six providers for initial title generation and regeneration. Ordinary titles, malformed JSON, and objects without a string title retain the existing handling. Existing saved titles are not migrated.

For Claude, accept either CLI output shape and read structured_output from the last result message in verbose output. Keep operation-specific schema validation, rejecting missing or malformed results instead of using assistant messages, earlier results, or the JSON-formatted result text. This covers all Claude text-generation operations through the shared adapter.

Testing

  • 41 focused Claude text-generation and shared prompt/normalization tests pass. JSON-title cases cover normal and verbose output, multiline JSON, whitespace, fallback, truncation, and invalid/non-title inputs. The new positive cases failed before their fixes.
  • Reproduced the verbose-array failure with real Claude CLI 2.1.263; the patched adapter successfully generated a clean title with --verbose and Sonnet 5.
  • Targeted lint, formatting, and diff checks pass.
  • Server typecheck was attempted but remains blocked by unrelated checkout dependency mismatches, including missing yauzl, stream-json/stream-chain, and stale Claude SDK types. No diagnostics in the changed files.

The JSON-title normalization is covered by controlled response fixtures matching the reported symptom. Six live calls across Sonnet 5, Haiku 4.5, and Opus 5 did not reproduce Claude generating a nested JSON title, so its upstream cause remains unconfirmed.

Model: GPT-6. Harness: Codex.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 7, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — This is a localized bug fix that preserves existing Claude output handling while adding support for verbose result arrays and valid JSON-wrapped titles. The production changes are small, tested, and introduce no schema, deployment, security, billing, default, or static-analysis configuration changes.

Not approved because:

  • Monthly spending limit reached (workspace setting). Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more.

@Noojuno Noojuno changed the title fix(server): handle verbose Claude text generation fix(server): handle JSON-wrapped titles and verbose Claude output Sep 7, 2026
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Sep 7, 2026
@Yash-Singh1
Yash-Singh1 merged commit 52b2bf7 into pingdotgg:main Sep 7, 2026
24 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 7, 2026
## What's Changed
* fix(web): show load balancing note for a single machine by @maria-rcks in pingdotgg/t3code#10433
* fix(server): follow placeholder branches after checkout updates by @Yash-Singh1 in pingdotgg/t3code#10441
* fix(mobile): expand single-line tool details in work logs by @Yash-Singh1 in pingdotgg/t3code#10442
* fix(server): import transcripts with oversized tool records by @Yash-Singh1 in pingdotgg/t3code#10430
* fix(marketing): deploy site with nightly releases by @t3dotgg in pingdotgg/t3code#10443
* fix(web): preserve multiline composer drafts during timeline scrolling by @Yash-Singh1 in pingdotgg/t3code#10444
* fix(server): handle JSON-wrapped titles and verbose Claude output by @Noojuno in pingdotgg/t3code#10446
* fix(marketing): restore continuous endorsement scrolling by @t3dotgg in pingdotgg/t3code#10450
* Revert "fix(marketing): restore continuous endorsement scrolling" by @t3dotgg in pingdotgg/t3code#10454
* fix(marketing): bring back the endorsement marquee by @t3dotgg in pingdotgg/t3code#10455
* chore: enable CodeRabbit automatic reviews by @t3dotgg in pingdotgg/t3code#10457
* fix(codex): keep Spark limits from replacing the main allowance by @Yash-Singh1 in pingdotgg/t3code#10458
* fix(marketing): send 95 nightly downloads to the downloads page by @t3dotgg in pingdotgg/t3code#10460
* fix(web): composer regains focus when you tab back into T3 Code by @t3dotgg in pingdotgg/t3code#10463
* fix(web): keep sidebar drag dividers clear and gestures smooth by @juliusmarminge in pingdotgg/t3code#10453
* fix(server): mark Cursor transport error answers as failed by @shivamhwp in pingdotgg/t3code#10337
* fix(web): clear stuck panel resize cursor by @t3dotgg in pingdotgg/t3code#10461
* fix(web): clarify sidebar drag dividers and empty targets by @juliusmarminge in pingdotgg/t3code#10464
* fix(web): make onboarding a shared multi-computer wizard by @juliusmarminge in pingdotgg/t3code#10465
* fix(shared): redeem reset credits through the hub when it holds the account by @juliusmarminge in pingdotgg/t3code#10462


**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260907.1325...v0.0.39-nightly.20260907.1332

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260907.1332
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants