René's URL Explorer Experiment


Title: Send() blocks indefinitely when ReadyForInitialPrompt returns false despite Status() reporting "stable" · Issue #209 · coder/agentapi · GitHub

Open Graph Title: Send() blocks indefinitely when ReadyForInitialPrompt returns false despite Status() reporting "stable" · Issue #209 · coder/agentapi

X Title: Send() blocks indefinitely when ReadyForInitialPrompt returns false despite Status() reporting "stable" · Issue #209 · coder/agentapi

Description: Bug POST /message with type: "user" hangs indefinitely when ReadyForInitialPrompt never returns true for the current screen, even though GET /status returns "stable". Root cause statusLocked() does not check initialPromptReady. It return...

Open Graph Description: Bug POST /message with type: "user" hangs indefinitely when ReadyForInitialPrompt never returns true for the current screen, even though GET /status returns "stable". Root cause statusLocked() does...

X Description: Bug POST /message with type: "user" hangs indefinitely when ReadyForInitialPrompt never returns true for the current screen, even though GET /status returns "stable". Root cause...

Opengraph URL: https://github.com/coder/agentapi/issues/209

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Send() blocks indefinitely when ReadyForInitialPrompt returns false despite Status() reporting \"stable\"","articleBody":"## Bug\n\n`POST /message` with `type: \"user\"` hangs indefinitely when `ReadyForInitialPrompt` never returns `true` for the current screen, even though `GET /status` returns `\"stable\"`.\n\n## Root cause\n\n`statusLocked()` does not check `initialPromptReady`. It returns `\"stable\"` when the screen is stable and the queue is empty. `Send()` passes the status validation and enqueues the message. But the `stableSignal` (which the send loop waits on) requires `initialPromptReady` to be `true`. If `ReadyForInitialPrompt` never returns `true`, the signal never fires and `Send()` blocks forever.\n\n```\nstatusLocked() = \"stable\"   →  Send() passes status check, enqueues\nstableSignal requires:       →  initialPromptReady \u0026\u0026 queue \u003e 0 \u0026\u0026 screenStable\ninitialPromptReady = false   →  signal never fires\nSend() blocks on errCh       →  forever\n```\n\n## Real-world trigger\n\nClaude Code v2.1.87 shows a theme selection onboarding screen that uses `╌╌╌` (Unicode dashed lines) instead of `───` (box-drawing characters). The message box detection in `findGreaterThanMessageBox` / `findGenericSlimMessageBox` fails because it looks for `───────────────` and `\u003e` which aren't present on this screen. `initialPromptReady` stays `false` and all `user`-type messages hang.\n\nLast 6 lines of the actual screen content:\n```\n  1  function greet() {                                                         \n  2 -  console.log(\"Hello, World!\");                                            \n  2 +  console.log(\"Hello, Claude!\");                                           \n  3  }                                                                          \n ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ \n  Syntax theme: Monokai Extended (ctrl+t to disable)                            \n```\n\nNote: `╌` (U+254C, BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL) vs `─` (U+2500, BOX DRAWINGS LIGHT HORIZONTAL).\n\n## Reproducing test\n\n```go\nfunc TestSendBlocksWhenInitialPromptNotReady(t *testing.T) {\n\tctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)\n\tt.Cleanup(cancel)\n\n\tmClock := quartz.NewMock(t)\n\tagent := \u0026testAgent{screen: \"onboarding screen without message box\"}\n\tcfg := st.PTYConversationConfig{\n\t\tClock:                 mClock,\n\t\tSnapshotInterval:      100 * time.Millisecond,\n\t\tScreenStabilityLength: 200 * time.Millisecond,\n\t\tAgentIO:               agent,\n\t\tReadyForInitialPrompt: func(screen string) bool {\n\t\t\treturn false // Simulates failed message box detection.\n\t\t},\n\t\tLogger: slog.New(slog.NewTextHandler(io.Discard, nil)),\n\t}\n\tc := st.NewPTY(ctx, cfg, \u0026testEmitter{})\n\tc.Start(ctx)\n\n\t// Fill snapshot buffer to reach stability.\n\tadvanceFor(ctx, t, mClock, 300*time.Millisecond)\n\n\t// Status reports \"stable\" — Send() will pass the status check.\n\tassert.Equal(t, st.ConversationStatusStable, c.Status())\n\n\t// But Send() blocks forever because stableSignal requires\n\t// initialPromptReady, which is false.\n\tvar sendDone atomic.Bool\n\tgo func() {\n\t\t_ = c.Send(st.MessagePartText{Content: \"hello\"})\n\t\tsendDone.Store(true)\n\t}()\n\tadvanceFor(ctx, t, mClock, 20*time.Second)\n\n\tassert.False(t, sendDone.Load(),\n\t\t\"Send() blocks forever: status said stable but stableSignal never fires\")\n}\n```\n\n## Possible fixes\n\n1. **Make `statusLocked()` check `initialPromptReady`**: return `\"initializing\"` or `\"changing\"` when `initialPromptReady` is false. This would cause `Send()` to reject the message with `ErrMessageValidationChanging` instead of hanging.\n2. **Improve message box detection**: add `╌╌╌` as an alternative to `───` in `findGreaterThanMessageBox` / `findGenericSlimMessageBox`.\n3. **Both**: fix the detection AND add the safety check in `statusLocked()`.\n\nOption 3 is likely the right approach — fix the detection for this specific Claude Code version, and add the statusLocked guard so future detection failures fail fast instead of hanging.\n\nDiscovered while smoke-testing #208.\n\n\u003e 🤖 This response was generated by Coder Agents.","author":{"url":"https://github.com/johnstcn","@type":"Person","name":"johnstcn"},"datePublished":"2026-03-31T13:36:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/209/agentapi/issues/209"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ee275574-d823-9ff9-2673-2cecbb4e6d29
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCD2A:11597D:1CCA8D:26380F:6A4F281B
html-safe-noncec8c744b36419c8b2eccb2a9a19de31b369f8dacd3590deec1007157e83f34032
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDJBOjExNTk3RDoxQ0NBOEQ6MjYzODBGOjZBNEYyODFCIiwidmlzaXRvcl9pZCI6Ijg4Mzg2OTczMTI4NjE0OTczNzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac206bfa3ec7cd38a5b3c9ebb888c696d142e19dfdf06eb46889b513378006a93b
hovercard-subject-tagissue:4179279684
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/agentapi/209/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e5cb23052dea94cb9d703d7c38456c2fdc03cb190e9f369efbf1bf98f10c0fdb/coder/agentapi/issues/209
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e5cb23052dea94cb9d703d7c38456c2fdc03cb190e9f369efbf1bf98f10c0fdb/coder/agentapi/issues/209
og:image:altBug POST /message with type: "user" hangs indefinitely when ReadyForInitialPrompt never returns true for the current screen, even though GET /status returns "stable". Root cause statusLocked() does...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejohnstcn
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
go-importgithub.com/coder/agentapi git https://github.com/coder/agentapi.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id961832048
octolytics-dimension-repository_nwocoder/agentapi
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id961832048
octolytics-dimension-repository_network_root_nwocoder/agentapi
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b8f23afb982271f1b22258a94aede67a6b77760
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/coder/agentapi/issues/209#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fagentapi%2Fissues%2F209
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fagentapi%2Fissues%2F209
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fagentapi
Reloadhttps://github.com/coder/agentapi/issues/209
Reloadhttps://github.com/coder/agentapi/issues/209
Reloadhttps://github.com/coder/agentapi/issues/209
Please reload this pagehttps://github.com/coder/agentapi/issues/209
coder https://github.com/coder
agentapihttps://github.com/coder/agentapi
Notifications https://github.com/login?return_to=%2Fcoder%2Fagentapi
Fork 129 https://github.com/login?return_to=%2Fcoder%2Fagentapi
Star 1.4k https://github.com/login?return_to=%2Fcoder%2Fagentapi
Code https://github.com/coder/agentapi
Issues 36 https://github.com/coder/agentapi/issues
Pull requests 4 https://github.com/coder/agentapi/pulls
Actions https://github.com/coder/agentapi/actions
Projects https://github.com/coder/agentapi/projects
Security and quality 1 https://github.com/coder/agentapi/security
Insights https://github.com/coder/agentapi/pulse
Code https://github.com/coder/agentapi
Issues https://github.com/coder/agentapi/issues
Pull requests https://github.com/coder/agentapi/pulls
Actions https://github.com/coder/agentapi/actions
Projects https://github.com/coder/agentapi/projects
Security and quality https://github.com/coder/agentapi/security
Insights https://github.com/coder/agentapi/pulse
Bughttps://github.com/coder/agentapi/issues?q=type:"Bug"
Send() blocks indefinitely when ReadyForInitialPrompt returns false despite Status() reporting "stable"https://github.com/coder/agentapi/issues/209#top
https://github.com/johnstcn
https://github.com/johnstcn
johnstcnhttps://github.com/johnstcn
on Mar 31, 2026https://github.com/coder/agentapi/issues/209#issue-4179279684
#208https://github.com/coder/agentapi/pull/208
johnstcnhttps://github.com/johnstcn
Bughttps://github.com/coder/agentapi/issues?q=type:"Bug"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.